Mark Wilson I am the creator of TopXML. I am available for international and local (Australia) contracts. I am a Solution Architect/Business Analyst. I have worked in IT in several countries (NZ, Australia, South Africa, UK) building and training teams for government and very large non-governmental organizations. I am ex-Microsoft Consulting Services. I wrote the first book on Microsoft XML published in 2000 called XML Programming with VB and ASP. Most recently I have been building tools for the SEO industry. Ask me for a 37 point SEO health-checkup for your website.
First posted :
03/24/2008
Times viewed :
3973
The <meta> Tag (XHTML Reference)
Introduction
The <meta> tag is one of the important tags if you
want your website to be quickly findable in search engines. It can also include
information about the author and the content of the page. However they can also
process http commands, for example a redirection to another webpage. Note that
this tag is not meant to create any comments about the page or something like
that. If you need to write down comments on your page, take a look at the
<!-- --> comment tag. You can use many meta tags as you like in one page
and it is usually defined in the head tag.
<meta http-equiv="expires" content="Mon,
30 July 2006 11:59:59 GMT" />
…
</head>
Each meta tag has two attributes. The first attribute is the
name or http-equiv and the second one is always content. The value of “name” is
bound with the value of the “content”. In the above example I have used value
of name as “author” and the value of content to “Sonu Kapoor”. That simply means
that the author of the page and content is Sonu Kapoor. In the second meta tag
I am using the http-equiv attribute with the value “expires”. The difference
between the “name” attribute and the “http-equiv” attribute is that the value
of http-equiv can be read by a web-server and the value in “name” is only
relevant for search-machines or robots. Here are few more examples:
Attributes
Name:
Description:
name
The name attribute can contain the following values:
Description: Used to define the description of the page.
The value of content can be a one or two line description.
Keywords: Used to define the keywords for search engines.
The value of content can be a list of comma-separated keywords. In
conjunction to that you can also use the lang (language) attribute with the
language code (en-us, en-uk, it, fr etc. ) as value to define the keywords in
other languages.
Date: Used to define the publication date of the page. The
value of content should be the Date/Time format and the UTC also known as GMT
or Greenwich mean time. Here is a short example: 2004-08-06T09:59:17+00:00.
If you want to use only the date, then you can just use the part before the
“T” (Time).
Revised: Used to define the last revision of the page. The
value of the content can be a name with a date.
Robots: Used to define whether robots also known as search
engines should be able to find this page or not. The value of content can be
“noindex” which means that you are forbid search engines to read the content
of the page. On the other hand the “index” value strictly allows the search
engine to read the content. The value “nofollow” means that you are
forbidding search engines to read also the sub directories of your website,
which can contain sensitive files. The value “follow” allows the engine the
also read sub directories.
http-equiv
The http-equiv can have one of the following values:
Content-Type: Used to define the content-type of the file.
In the content value you can then specify the file type – for xhtml/html
files this value is “text/html”.
Content-Script-Type: This value works the same as the
“Content-Type” with the difference that it is used to define the scripting
language of the page. The value of content can be text/javascript for a
javascript page, text/css for your style sheet or any other.
Expires: The “expires” value is used to clear the cache at
a specific time. The content value can be either a date/time as shown in the
above example or you can set it to 0 to read always from the server instead
from the cache.
Refresh: The refresh value can be used to redirect a user
to another page. The value of content can be a URL or a page. You also have
to define the seconds in which the redirection should occur. Here is an
example: