What /needs/ to be in <head>

liunx

Guest
I would like to know what needs to be the <head> of a document and/or what you recommend to have in the <head> of a document.<br />
<br />
That's pretty much it.<br />
<br />
// freak<!--content-->Title, stylesheet and Javascript functions are the main ones.<!--content-->content type<!--content-->Here's a somewhat list based on a current template I'm working on.<br />
<br />
<title>tag.<br />
<meta> tag showing description.<br />
<meta> tag showing who is the author.<br />
<meta> tag showing the copyright.<br />
<meta> tag showing the language.<br />
<meta> tag for robots.<br />
<meta> tag for revisits.<br />
<meta> tag for showing rating of content like "general."<br />
<meta> tag for content-type.<br />
<link> tag for external stylesheet.<br />
<javascript> tag for any JavaScript.<br />
<link> tag for favicon.<br />
<br />
Now, most people would also incluce a <meta> tag for keywords, but very few search engines use that tag anymore, so I would debate how usefull it is.<!--content-->On the note of content types, here are a few to get you started:<br />
<br />
<meta http-equiv="Content-Type"<br />
content="text/html; charset=iso-8859-1" /><br />
<br />
<meta http-equiv="Content-Type"<br />
content="text/html; charset=utf-8" /><br />
<br />
<meta http-equiv="Content-Type"<br />
content="text/html; charset=utf-16" /><br />
<br />
<br />
Note that your should save your HTML files in Unicode if you want the UTF-16 charset to actually work. And then you'll need all your JavaScript and CSS files saved as Unicode too. I think I saw a topic on this site or tutorialforums.com where somebody had saved a Unicode HTML page that imported an ANSI charset CSS file, and the browser didn't recognize the CSS file.<!--content-->I recommend that the <title> element go within the head and depending upon which language you use character encoding is also another good choice.<br />
<br />
Again, default Content-Script-Type and Content-Style-Type are also good contenders.<!--content-->
 
Back
Top