META tags in HTML files..

admin

Administrator
Staff member
I like to consider myself reasonably knowledgable of the majority of the HTML 4.01 spec, and XHTML too (seeing as they're almost the same thing that's probably irrelevant), but one thing that has always confused me (and seems incredibly under-documented in most books I've read) is a complete listing of the various types (and relevance) of the meta tags available. There seems to be no readily available resources on this topic. Anyone with any links (or knowledge) to share?<!--content-->do a search on google, you will find plenty of sites that document meta tags.<!--content-->Meta tags depend on what usage they are for.<br />
<br />
There are some that are required by the browser, like the doctype and content-type tags. These tell the browser which version of HTML, and which character set is in use for that page.<br />
<br />
Other tags are used by search engines, such as the title, keywords, and description; some are widely used.<br />
<br />
There is a content-language tag. It is not yet widely used but could help with online translation tools, as well as help the search engines to index sites more effectively.<br />
<br />
There are other tags, like author, copyright, revisit and so on, which are not currently used or indexed by search engines but which may be in the future.<br />
<br />
There is the MSPreventParsing tag to stop M$ browsers from sourcing adverts from other sites to dump over all page views.<br />
<br />
There are the robots and cache directives which direct whether search engines index certain parts of the site or not, and whether they cache pages or not. The robos directive can also be done more effectively with a separate 'robots.txt' file. Google has its own Googlebot tag that you can add to tell their spider about important information.<br />
<br />
There is another directive to stop the browser caching pages, so that the user gets an automatic refresh for each site revisit.<br />
<br />
When XML becomes more widespread, all the Dublin Core meta tags will be more widely known. There are a large number of these, all easy to spot as they begin with D.C. lettering.<br />
<br />
As above, Google has a lot more on this subject.<!--content-->Interestingly, I've never ever seen a web page NOT work because it didn't have meta tags or a dtd declaration. ;)<br />
<br />
Even the god of all html beginners, Joe Burns, stated something along the lines in his book "HTML Goodies" that he never used to put any meta tags or dtd in his pages until someone told him he had to, even though he couldn't really see any difference. I couldn't find the exact reference on his website <!-- m --><a class="postlink" href="http://www.htmlgoodies.com">http://www.htmlgoodies.com</a><!-- m --> but thena again I didn't look too hard.<br />
<br />
All that being said, it's certainly not a bad idea to add 'em and there are some very useful things they can do.<br />
<br />
Neil<!--content-->My 'minimum' header has all of this:<br />
<br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><br />
<HTML><br />
<br />
<HEAD><br />
<TITLE> Your Title Here </TITLE><br />
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"><br />
<META HTTP-EQUIV="Content-Language" CONTENT="EN-GB"><br />
<META NAME="Keywords" CONTENT=" your keyword list here "><br />
<META NAME="Description" CONTENT=" Your Description Here. "><br />
</HEAD><br />
<br />
<BODY><br />
<br />
The Title, Keywords, and Description are useful to some search engines (and the Title is displayed by the Browser along the top of the window).<br />
<br />
The DocType is useful for Validation and to tell the browser what version of HTML is being used.<br />
<br />
The Character Set and Content Language tags are going to become more important in search engines in the future. They also help with online translation tools, and help visitors to your web site that use other settings as their default.<br />
<br />
If you omit the DocType then the browser uses Quirks Mode where it attempts to make a "best guess" as to what your HTML code means. If you omit the character set declaration then the browser will use its default setting, which may be a different character set than that intended by the web site author.<br />
<br />
Additional items such as Copyright, Distribution, PICS rating, and others are left for you to decide. As XML becomes more popular, then all the 'DC.Description', and so on, tags will become more well known, but can be safely ignored by most people for now.<br />
<br />
<br />
I will sometimes also add:<br />
<br />
<META NAME="MSSmartTagsPreventParsing" CONTENT="TRUE"><br />
<META NAME="Generator" CONTENT="Wordpad"><br />
<META NAME="Author" CONTENT="Your Name Here"><br />
<META NAME="Date" CONTENT="2002-09-30"><br />
<br />
<br />
Any more is usually overkill; but some commercial entities like to add a Copyright line, just to keep their corporate bean counters happy; not that it can easily be enforced.<!--content-->Cheers all for your help. Has proven most useful.<br />
<br />
Thanks again!<br />
<br />
(and thank Google for putting me in touch with this group..has been by far the most constructive learning I've done in a while..)<!--content-->
 
Back
Top