(Last Updated 11/26/98)



HTML Meta Tags



In semantics, the term META is a prefix (not a word) which refers to that part which is in the background or hidden, but is there and has an effect. In computing, the term usually refers to items which provide a definition or description of something. SGML is a Meta-Language since it provides rules for (defines) other languages. A specific instance of this definition is HTML. HTML defines a set of formatting tags that any Web document can contain.

In HTML, the META element (tag) is a method to embed specialized document information (information about the document rather than the document's content) not defined by other HTML elements. It is a document based element and is always placed in the document HEAD.



Each META tag has the form:       <META   Attribute   Value>



A typical META line on a page would be:

This tag says the name of the information is "Author" and the information itself is "Huck Finn, 11/18/98". In HTML, this Name/Value pair format is open ended and, therefore, the META tag is termed extensible. This means that just about any kind or amount of information the document author wishes to include can be fit into a META tag. This information may be used by servers & clients in identifying and cataloguing documents; by the server (HTTP servers can read the content of a document's header) to generate the documents response header (when the HTTP-EQUIV attribute is used); or just to place the information "on record."

When <META HTTP-EQUIV=...> is used instead of <META NAME=...>, the author is indicating that the browser should pretend that the Name/Value pair in the tag was sent as an HTTP header. HTTP headers contain meta-information about the document and are sent by the server before any HTML for the page is sent. In Netscape, the header information can be seen by choosing "Page Info" in the "View" menu. One interesting item found by doing this though is that although browsers make use of the HTTP-EQUIV information as if it were an HTTP header, the information is not actually put into the header. It was originally intended that servers would read the tags and add them to the HTTP headers, but server makers found that it takes too much overhead to implement it. The fact that the information is in fact used can be seen in the client pull mechanism implemented with the

<META   HTTP-EQUIV="refresh"   CONTENT="n; URL=NextPage.html">
which will load "NextPage.html", n seconds after the present page completes loading.



Typical Attribute Names

Attribute Name
NAME="..." or HTTP-EQUIV="..."
Description
NAME="description"The text a search engine will display when it returns information about the document. If no description is given, search engines usually return the first 175 or so characters of the page, excluding HTML tags.
NAME="keywords"A list of words separated by commas for spiders (search engines) to use to index the document.
NAME="author"The author's name or company.
NAME="copyright"The author's name or company's copyright claim and date.
NAME="owner"The owner's name or company.
NAME="designer"The designer's name or company.
NAME="coder"The coder's name or company.
NAME="creation-date"The date the document was created.
NAME="modification-date"The date of the documents last modification.
NAME="generator"The name of the editor generating the page.
NAME="classification"A classification of the type of content found in the document.
HTTP-EQUIV="author"CONTENT="Carl Paulson"
When the browser loads the document, it pretends that there is a header "Author:   Carl Paulson" in it.
HTTP-EQUIV="keywords"When the browser loads the document, it pretends that there is a header containing the keyword list.
HTTP-EQUIV="refresh"
(Section 10.35)
CONTENT="n; URL=http://www.Foo.com/foo.html"
Causes the page to refresh itself (if no URL is provided) or load a second URL (if provided) n seconds after the current page completes loading. This refreshing mechanism is clled "client pull."
HTTP-EQUIV="Expires"
(Section 10.19)
CONTENT="Mon, 06 Jan 1990 00:00:01 GMT"
This field gives the date/time after which the document should be considered stale. Browsers will not cache this document after the date given so it may be used to force a "no-cache." The presence of an "expires" field does not imply that the document will change or cease to exist at, before, or after that time.
Three date formats are accepted (Examples copied from Section 3.3 of the HTTP 1.1 protocol):
    Sun, 06 Nov. 1994 08:49:37 GMT
    Sunday, 06-Nov.-94 08:49:37 GMT
    Sun Nov 6 08:49:37 1994
HTTP-EQUIV="PICS-Label"

{PICS=Platform for Internet Content Selection
For more information see the RASCi page.
CONTENT='(PICS-1.0 "http://www.rsac.org/ratingsv01.html" l gen false comment "RSACi North America Server" by "{server e-mail addy}" for "{site URL}" on "{date and time of rating}" exp "{date and time rating expires}" r (n 0 s 0 v 0 l 0))'
A Meta Tag used to rate the content of the document. Companies and parents are using this tag to limit viewing of certain documents or sites. The rating ("r") shown above is interpreted as: no Nudity ("n = 0"); no Sex ("s = 0"); no Violence ("v = 0"): and no objectionable Language ("l = 0").
HTTP-EQUIV="language"
(Section 10.11)
CONTENT="en-US"
This field identifies the natural language used in the document. The syntax follows that defined by RFC 1766:
primary-tag - secondary-tag (any two-letter primary-tag is an ISO 639 language abbreviation and any two-letter subtag is an ISO 3166 country code). The default value is "unknown."
Examples: en {plain English}, en-US {English US}
HTTP-EQUIV="Accept-Charset"
(Section 10.2)
CONTENT="iso-8859-1, unicode-1-1"
The default is any character set is acceptable. The preferred (Section 3.4) set tokens are: "US-ASCII", "ISO-8859-x" (x = 1 through 9), "ISO-2022-JP", "ISO-2022-JP-2", "ISO-2022-KR", "UNICODE-1-1"
HTTP-EQUIV="Content-Type"
(Section 10.15)
CONTENT="text/html;charset=x-euc-jp"
This field indicates the media entity-header field indicates the media type the document represents. The most common type in this situation is type "Text", subtype "HTML"
(It should be noted that neither Netscape nor IE parse the document body for the coding type if this header is included.)
HTTP-EQUIV="Base"
(Section 10.7)
CONTENT="base URL"
The Base field is used to specify the base URL for resolving relative URLs.
{URL = (base URL | relative URL) [ "#" fragment ]}




Examples

  • Using Expires to prevent page cacheing
  • Using Refresh to provide regular page updates
  • Using Refresh to provide a page slide show
  • Using Description to specify the Search Engine synopsis of your page
  • Specifying the Characters to use in a net page



    Meta Elements Found on the Web

    The following partial list was extracted from web pages and gives an example of the varied META attribute names used. It may be noted that this is only a partial list.

    NAME

    HTTP-EQUIV




    Testing Your Meta Tags

    Now that your conpletely fed up with this topic, I will say there is an easy way to test your meta tags. Its called Meta Medic. It is provided freely by Calzo Marketing Services. MEDA medic is a combination webspider and syntax checker. Simply give this application your url, and it will generate a report on your meta tags.





    Contact Carl Paulson with questions,
    or Visit my pages.



    Other Programming & Scripts Pages

    | Main Page | Java | C++(not yet active) | HTML |
    | Java Script | mIRC / LittleStar | IRCLE | Shadowbot | Apple |