russ208 Posted January 31, 2012 Report Posted January 31, 2012 This is my 1st post here. I built a site literalconcepts.com via Coffeecup (an HTML editor) I am at the last leg of the site configurations and it is asking for a header. In fact this is the message: Header Certain information, such as links to custom style sheets, JavaScript, DOCTYPEs, etc. are placed in the <head> section of a webpage. What exactly are they looking for? Please be as specific as all possible as I am a bit technically challenged. Thanks in advance, Russell Quote
Wickham Posted January 31, 2012 Report Posted January 31, 2012 (edited) Well, that's not quite correct. The doctype should be the first piece of code in your html file, above the <html> tag. We normally recommend the HTML 4.01 Strict doctype on this forum, but many people use the XHTML 1.0 doctype or the provisional new HTML5 doctype. Use the HTML 4.01 Strict doctype from here:- http://www.w3.org/QA/2002/04/valid-dtd-list.html Javascript is used for special dynamic features on a web page like a sliding photo gallery or a drop down menu an dneeds code inside <script type="text/javascript">...........</script> tags inside the head section although you can place the script tags anywhere, even at the bottom of the page just before the </body></html> closing tags. If you are a beginner you may not have any javascript code, but a doctype is essential. A custom stylesheet is a separate file with .css extension containing styles to apply to your tags, like backgrounds, font sizes, color, margins and so on. You link to the separate file with code in the head section of your html page:- <link rel="stylesheet" href="style.css" media="all" type="text/css"> http://www.w3schools.com/css/css_intro.asp http://www.w3schools.com/css/css_howto.asp Remember to validate (check) your code here:- http://validator.w3.org/ Edited January 31, 2012 by Wickham Quote
russ208 Posted January 31, 2012 Author Report Posted January 31, 2012 Thanks Wickham. Your info is invluable to me. I want to udnerstand something a little more clearly. Even though my site www.literalconcepts.com can be viewed on the net, I still have to enter the doctype as mentioned above? This is for?? As for the style sheet mentioned, do I need this if the site is able to be viewed the way I like?? And finally the header that they mention. What do I enter for the header?? Thanks so much for the info. Much appreciated!! Russell Quote
Andrea Posted February 1, 2012 Report Posted February 1, 2012 "The net" is a pretty broad term. You need to look at how your site is viewed in different browsers (IE, Firefox, Chrome, Safari, Opera - and those are just the most prominent ones) and all their different versions. Using a proper doctype will go a long way in ensuring your site displays decent in as many browsers as possible. (BTW, you want HTML 4.01 strict and then make sure your code validates) You don't 'need' a stylesheet, but it'll make your life easier. With one, every page of your site is linked to the same styles, and if you change, for example, the font color in your stylesheet, it'll automatically apply to your entire site. Alternatively, you'd have to go to every single page and change your inline and/or internal styling one page at a time. And I think the term 'header' as they use it is misleading - that part towards the top of a website is called the 'head' section - many of us refer to the header as the visible top part that has the banner, site name, etc. on it. Quote
russ208 Posted February 1, 2012 Author Report Posted February 1, 2012 thanks so much for the reply! I really appreciate it Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.