Meta tags provide a means of adding extra information
about your HTML document. This is information that either your browser might be
able to make use of or typically to provide additional information to search
engines.
There are two types of meta tags:
<META NAME="tag" CONTENT="data">
and
<META HTTP-EQUIV="tag" CONTENT="data">
Information provided by HTTP-EQUIV is passed to the
browser before it receives the rest of the document. It provides information
that could therefore affect how the browser handles the document. Both styles of
meta tags must be positioned within the head of the document (i.e. between the
<HEAD> and </HEAD> tags).
META NAME tags
Meta Name |
Description |
Author |
The name of the author of the page. |
Copyright |
Allows a copyright statement to be embedded. |
Description |
A short description of the page. Used by search engines
as a summary description of the page. |
Generator |
The name of the tool used to create the page. (Unsure how
useful this is to web-authors.) |
Keywords |
Used by search engines to index the page. Use to specify
keywords of relevance to the page. |
Robots |
Gives instructions to web-robots (also called web bots).
Be aware that the web-bot is free to ignore it! The CONTENT portion should
be a comma separated list of one or more of the following:
NOINDEX |
Do not index
the page. Unless "NOFOLLOW" is also specified then any links on the page
may still be followed. |
NOFOLLOW |
Do not follow
any links that are on the page. |
NOIMAGEINDEX |
Do not index
any of the images on the page. |
NOIMAGECLICK |
Do not index
links to images on the page, instead use a link to the page. |
For example to prevent a page from being indexed:
<META NAME="Robots" CONTENT="NOINDEX">
these tags can be combined so, for example, to prevent
a page from being indexed and any links followed:
<META NAME="Robots" CONTENT="NOINDEX, NOFOLLOW">
|
HTTP-EQUIV tags
HTTP-EQUIV tags that are not recognised (i.e. supported)
by the browser and will be silently ignored (i.e. the viewer will not see an
error). So you can use HTTP-EQUIV tags safely without worrying too much whether
a given browser will support them.
Meta Name |
Description |
Content-Type |
Specifies the character encoding scheme used for the document. A semicolon
(;) can be used to combine values. Typical values:
CONTENT="text/html"
Standard HTML.
CONTENT="text/html; charset=ISO-8859-1"
Standard HTML, character set is ISO-8859-1, which is
the standard for Western Europe and is also the normal browser default. For
lists of possible character sets see:
http://www.w3.org/International/O-charset-lang.html |
Expires |
For
caching purposes this stages when the document expires. Web robots may
delete expired documents from their indexes or may schedule a revisit. The
format is:
CONTENT="Weekday, DD MMM YYYY HH:MM:SS TIMEZONE"
For example: "Thu, 7 Feb 2002 13:00:00 GMT"
An invalid value (such as 0) denotes 'now', forcing a
check on each visit. |
Page-Enter |
Microsoft Internet Explorer 5.5+ only.
Specifies how the page should appear to replace the
previous page in the browser.
For a summary of the transitions available see:
http://www.jansfreeware.com/articles/ie-page-transitions.html.
The Microsoft documentation on page transitions can be
viewed at:
http://msdn.microsoft.com/workshop/author/filter/reference/reference.asp,
but be aware that this concentrates on applying transitions to styles. An
interactive demonstration of filters and transitions can be found at
http://msdn.microsoft.com/workshop/samples/author/dhtml/dxtidemo/dxtidemo.htm
. |
Page-Exit |
Microsoft Internet Explorer 5.5+ only.
Specifies how the page should appear to disappear when
the browser moves on to another page. Otherwise the options are the same as
for
Page-Enter. |
Pragma |
There
is only one pragma directive:
<meta http-equiv="Pragma" content="no-cache">
This requests that the page not be cached locally by
the browser. |
Refresh |
Tells
the browser to wait a specified number of seconds before loading a new page.
For example to reload the current page after five
minutes:
CONTENT="600"
To load a different page after 5 seconds:
CONTENT="5; URL=http://cryer.co.uk/index.htm" |
Googlebot |
In
addition to the ROBOTS META Command above, Google supports a GOOGLEBOT
command. With it, you can tell Google that you do not want the page
archived, but allow other search engines to do so. If you specify this
command, Google will not save the page and the page will be unavailable via
its cache.
<META NAME="GOOGLEBOT" CONTENT="NOARCHIVE">
|
|