BASIC HTML 101
Overall HTML format:
META - Meta-information
Appearance: |
<META NAME=string CONTENT=string >
|
Attributes: |
HTTP-EQUIV=string |NAME=string , CONTENT=string
|
Contents: |
None (Empty).
|
May occur in: |
HEAD.
|
The META tag is used to convey meta-information about the document, but
can also be used to specify headers for the document. You can use either
HTTP-EQUIV or NAME to name the meta-information, but CONTENT must be used
in both cases. By using HTTP-EQUIV,
a server should use the name indicated as a header, with the
specified CONTENT as its value. For example,
<META HTTP-EQUIV="Expires" CONTENT="Tue, 04 Dec 1993 21:29:02 GMT">
<META HTTP-EQUIV="Keywords" CONTENT="Nanotechnology, Biochemistry">
<META HTTP-EQUIV="Reply-to" CONTENT="dsr@w3.org (Dave Raggett)">
The server should include the following response headers when the
document is requested:
Expires: Tue, 04 Dec 1993 21:29:02 GMT
Keywords: Nanotechnology, Biochemistry
Reply-to: dsr@w3.org (Dave Raggett)
Popular uses for META include:
- <META NAME="generator" CONTENT="Some program">
- This indicates the program used to generate this document. It is often
the name of the HTML editor used.
- <META NAME="author" CONTENT="Name">
- This indicates the name of the author.
- <META NAME="keywords" CONTENT="keyword keyword keyword">
- Provides keywords for search engines such as Infoseek or Alta Vista.
These are added to the keywords found in the document itself. If you
insert a keyword more than seven times here, the whole tag will be
ignored!
- <META NAME="description" CONTENT="This is a site">
- Search engines which support the above tag will now display the
text you specify here, rather than the first few lines of text from
the actual document when the document shows up in a search result. You
have about 1,000 characters for your description, but not all these
will be used.
- <META HTTP-EQUIV="refresh" CONTENT="n; URL=http://foo.bar/">
- This is a so-called "meta refresh", which on certain browsers causes
the document mentioned in the URL to be loaded after n seconds.
This can be used for slide shows or for often-changing information, but
has some drawbacks. In particular, if you use a value of zero seconds,
the user can no longer go "Back" with his back button. He will be
transferred to the specified URL, and when he presses "back" there,
he will go back to the document with the refresh, which immediately
redirects him to the document he tried to get away from. However,
if the user is really fast on the mouse/back buttons, he may be able
to double click on the "back" and back up to the display before the
transferring document. Try this META file with a 10 second timeout.
- <META HTTP-EQUIV="expires" CONTENT="Tue, 20 Aug 1996 14:25:27 GMT">
- This indicates that the document containing this META tag will
expire at this date. If the document is requested after this date,
the browser should load a new copy from the server, instead of using
the copy in its cache.
Notes:
- Not all servers use the information from META tags to generate
headers, although some browsers will treat what they find in here like
it was a header.
- The "keywords" and "description" values are currently only used
by Alta
Vista and Infoseek.