Forum Moderators: open
TITLE
Obviously we want to use title tags. So this is definitely in.
Notes
1. Keywords up front
2. Look at Brett's Theme Pyramid for choice of words used in title
META DESCRIPTION
To my knowledge, this is still relatively important, and is used in many places as the SERP description
Notes
The meta description is primarily for human consumption, so avoid stuffing it with keywords...Keep it short and descriptive, and E Y E catching
META KEYWORDS
Got spammed to death when they were used more prominently in the past, and do not really matter too much anymore
Notes
1. Theres a new thread floating around on this subject, enough said there ;)
META HTTP EQUIVALENTS
Bit of a grey area here, dunno how many of these can be used. Im talking about these
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta http-equiv="Content-Language" content="en-us">
I understand the first one is wisely used for cross browser compatibility, and the second one for some region sensitive search engines. Perhaps I could use en-us and en-uk for possible US/UK english spelling differences, you know, people searching for UK spellings of a word may find more sites with en-uk, Im not sure. I would be glad to hear someone expand upon this.
JAVASCRIPT OTHER INCLUDES
OK im heading into a dark area for me now, because Ive played with javascript, but tend to avoid it. Some javascript goes in the head tag
So what other things are the head used for? What HAS to be in the head? What can be in the head but probably isnt worth the space?
Im sure you get the idea behind this thread.....would be great to here more about the power of the head.
Remember WMW'ers two heads are better than one ;)
If you want 100% W3C validation, the above meta is mandatory.
Here are the first lines of text on most of my sites...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
<meta name="description" content="">
<meta name="keywords" content="">
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
<link href="styles.css" type="text/css" rel="stylesheet">
<script language="javascript" src="index.js" type="text/javascript"></script>
</head>
Here is the code page for 1252 from MS...
[microsoft.com...]
These are the four that are recognized as Western European...
iso-8859-1 / latin1
x-mac-roman
macintosh
windows-1252
Supported Character Sets [w3.org]
Microsoft's Character Set Recognition [msdn.microsoft.com]
Just keep the tag short and sweet, to the point, no fluff, and specific to the on page content. Maybe 10-15 words at the most.
Pssst... It also appeases those clients who absolutely have to see a keywords tag when they view source. I have a couple clients that just don't want to accept the fact that the tag does not have the importance that it once used to!
Keywords, 10/20 keywords is not a waste of space, a few thousand pages of keywords can be sent at the cost of a cent ;) I vote they stay IMO :) until im told otherwise
For clients, shoving keywords in like pageoneresults says, is a bonus :)
What about other meta tags, is the author one worth using?
I dont know the full scale of things available to be put into the head tag and their worth, maybe its worth listing all of them and their relative use, which is sorta what we are doing now :)
<META NAME="author" CONTENT="">
<META NAME="classification" CONTENT="">
<META NAME="copyright" CONTENT="">
<META NAME="description" CONTENT="">
<META NAME="distribution" CONTENT="">
<META NAME="doc-class" CONTENT="">
<META NAME="doc-rights" CONTENT="">
<META NAME="doc-type" CONTENT="">
<META HTTP-EQUIV="Expires" CONTENT="">
<META NAME="keywords" CONTENT="">
<META NAME="language" CONTENT="">
<META NAME="MSSmartTagsPreventParsing" CONTENT="TRUE">
<META NAME="owner" CONTENT="">
<META NAME="publisher" CONTENT="">
<META NAME="rating" CONTENT="">
<META NAME="revisit-after" CONTENT="">
<META NAME="robots" CONTENT="">
I don't see this many too frequently, but when I do, I think, whoa, why so many tags and what purpose are they serving? There has to be a reason? Just isn't part of my reasoning!
<META NAME="revisit-after" CONTENT="">
I don't know if this is the right story, but from what i know this tag was invented by a man in Canada who had a small regional search engine, he wanted the sites in his area to be able to put this tag on there sites so he knew when his spider should crawl there sites, then someone looked at the source on one of those pages, and from there it has gone, from what i know; No big search engine have ever used this tag :)
I believe Inktomi used to default to "INDEX, NOFOLLOW" at one time, and placing "INDEX,FOLLOW" was helpful in getting a deeper crawl. I doubt that this is still true.
Also don't forget keeping pages out of the Google cache with:
<META NAME="GOOGLEBOT" CONTENT="NOARCHIVE">
I use this on time sensitive information pages, such as sale prices!
<meta name="robots" content="index,follow,noarchive">
successfully to keep google from caching. Others SEs ignore it. However, if another SE starts using a google-type cache, they might honor it too, whereas they would not honor the google-specific tag.
I believe I got that tag off of one of google's early help pages - it might even still be in there.
Does anyone else put "Favicon" or http-equiv tags in their head sections?
Basically, you only need to put JS elements such as variable declarations and function definitions in the head section if they will be needed by - or will be needed to control - other script sections on your page. You put them there because the head section is always loaded before any body-resident script is loaded or executed.
Because of the (seemingly-random) way that browsers load page elements, and especially because of the way they may load scripts from external files in out-of-page-reference-order, this method prevents "timing problems" - say where a script might start running before a variable (which is supposed to be defined by another assumed-to-be-previously-loaded script section) that it needs is actually defined, and crash because the "defining" script has not actually finished loading.
This is discussed (lightly) in Netscape's
JavaScript Guide or their JS Reference at [developer.netscape.com...]
(worth a bookmark)
HTH... Jim
I don't know if this is the right story, but from what i know this tag was invented by a man in Canada who had a small regional search engine
That would be SearchBC [vancouver-webpages.com]. And here is the form that generated SearchBC's excessive METAs [vancouver-webpages.com].
NetInsert.com doesn't look so bad now, does it guys?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Also, include CSS for _all_ browsers thus:
<link rel="stylesheet" href="my_css_stylesheet.css" type="text/css">
And for CSS you don't want Netscape 4.x to see, use:
<link rel="stylesheet" media="all" href="not_for_netscape.css" type="text/css">
Also, if you want to comply with P3P, you have to have:
<link rel="P3Pv1" href="/w3c/p3p.xml">
,plus (for P3P), a bunch of other external stuff I can't remember ATM :)
But the lesson is to use the head-space efficiently. (lol! I'm going to avoid the sarcasm and double entendres, at least for now!)
I like pageoneresults' example of overkill! I recently visited an auto dealer's website that must've had every possible meta tag stuffed into the head content. It was bizarre, and ridiculous! If the webmaster spent as much time learning about SEO and proper USE of meta tags as he or she did in finding all of these exotic beauties, he would've been ahead of the game.
We pretty much know which search engines no longer give heed to keyword meta tags, but I think it is still a good idea to include them. Who knows what "key-word-hungry" spider may be lurking nearby?
Although it isn't included in the <head> tags, I do think of the doctype as part of the *head* of a HTML document, and quite important, as well. I suppose then that a HTMP document is made up of _3_ parts, doctype, head, body?
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">If you want 100% W3C validation, the above meta is mandatory.
No it's not.
I never use this and 99.9% of my pages validate.
It's more important to specify doctypes and stuff before the head for proper validation like this...
<?xml version="1.0" encoding="ISO-1859-1" ?>
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
Warnings
Warning: No Character Encoding detected! To assure correct validation, processing, and display, it is important that the character encoding is properly labeled. Further explanations.
Its not an error, just a warning. And note, I specifically stated 100% validation which to me means no errors.
Are there now two ways to specify character encoding?
To switch some browsers to render code the way God intended, you have to have the _full_ doctype declaration right at the top. For HTML 4.01 transitional it would be:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Using the full DTD has been known to cause problems with certain design techniques, mostly CSS and absolute positioning. The preferred DTD in that instance is the shortened version which eliminates the problems.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
Brett turned me on to that tip after I was having some spacing problems at the top of my pages. Come to find out it was the full DTD that was causing it!
Quirk mode will render css improperly in some cases, most noticeable is the "box model" issue, which may cause unsatisfactory results for positioned elements.
Ironically, by inducing "quirk mode" rendering, your css/elements are being improperly displayed (according to standards) but the result is consistant accross most browsers, thus giving the desired results.
Here is a chart that lists the various doctypes and rendering status:
[gutfeldt.ch...]
Here is the article:
[gutfeldt.ch...]
Both are good resources and can help explain rendering problems.