<META>NN all   IE all   HTML all
<META>End Tag: Forbidden
 

A META element conveys hidden information about the document, both to the server that dishes up the document and to the client that downloads the document. The element is also used to embed document information that some search engines use for indexing and categorizing documents on the World Wide Web.

More than one META element may be included in a document, and all META elements belong nested inside the HEAD element. The specific purpose of each META element is defined by its attributes. Typically, a META element reduces to a name/value pair that is of use to either the server or the client. For example, most browsers recognize attribute settings that force the page to reload (or redirect to another page) after a timed delay. This would be useful in a page whose content is updated minute-by-minute, because the browser keeps reloading the latest page as often as indicated in the META element.

Several other elements and attributes in HTML 4.0 contain the same kind of meta-data that might otherwise be located in META elements. Use the avenue that is best suited to your intended server and browser environments. In many cases, real-world implementations must catch up with the HTML 4.0 specification before you will be faced with those decisions.

See also the ADDRESS, DEL, INS, LINK, and TITLE elements, as well as the PROFILE attribute of the HEAD element.

 
Example
<HEAD PROFILE="http://www.giantco.com/profiles/common">
    <META NAME="Author" CONTENT="Jane Smith">
    <META NAME="keywords" CONTENT="benefits,insurance,plan">
    <META HTTP-EQUIV="refresh" 
CONTENT="1;URL=http://www.giantco.com/truindex.html">
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; 
charset=ISO-8859-5">
</HEAD>
CONTENTNN all   IE all   HTML all
CONTENT="valueString"Required
 

The equivalent of the value of a name/value pair. The attribute is usually accompanied by either a NAME or HTTP-EQUIV attribute, either of which act as the name portion of the name/value pair. Specific values of the CONTENT attribute vary with the value of the NAME or HTTP-EQUIV attribute. Sometimes, the CONTENT attribute value contains multiple values. In such cases, the values are delimited by commas. Some of these values may be name/value pairs in their own right, such as the content for a refresh META element. The first value is a number representing the number of seconds delay before loading another document; the second value indicates a URL of the document to load after the delay expires.

 
Example
<META HTTP-EQUIV="refresh" 
CONTENT="2;URL=http://www.giantco.com/basicindex.html">
 
Value
Any string of characters. The string must be inside a matching pair of (single or double) quotation marks.
 
Default None.
 
Object Model Reference
IE [window.]document.all.elementID.content
HTTP-EQUIVNN all   IE all   HTML all
HTTP-EQUIV="identifier"Optional
 

When a server sends a document to the client with the HTTP protocol, a number of HTTP header fields are sent along, primarily as directives to the client about the content on its way. META elements can add to those HTTP headers when the HTTP-EQUIV attribute is assigned to a document. Browsers convert the HTTP-EQUIV and CONTENT attribute values into the HTTP response header format of "name: value" and treat them as if they came directly from the server.

Web standards define a long list of HTTP headers (see Webmaster in a Nutshell by Stephen Spainhour and Valerie Quercia, published by O'Reilly & Associates), but some of the more common values are shown in the following examples. You can have either the HTTDIRECTIONP-EQUIV or NAME attribute in a META element, but not both.

 
Example
<META HTTP-EQUIV="refresh" 
CONTENT="1,http://www.giantco.com/truindex.html">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-5">
<META HTTP-EQUIV="expires" CONTENT="Sun, 15 Jan 1998 17:38:00 GMT">
 
Value
Any string identifier.
 
Default None.
 
Object Model Reference
IE [window.]document.all.elementID.httpEquiv
NAMENN all   IE all   HTML all
NAME="identifier"Optional
 

An identifier for the name/value pair that constitutes the META element. Typically, the attribute value is a plain-language term that denotes the purpose of the META element, such as "author" or "keywords". You can assign a value to either the NAME or HTTP-EQUIV attribute, but not both, in the same META element.

 
Example
<META NAME="Author" CONTENT="Jane Smith">
<META NAME="keywords" CONTENT="benefits,insurance,plan">
 
Value
Any string identifier.
 
Default None.
 
Object Model Reference
IE [window.]document.all.elementID.name
SCHEMENN n/a   IE n/a   HTML 4
SCHEME="identifier"Optional
 

Provides one more organizational layer to meta-data supplied with a document. For example, a university campus with several libraries might generate documents associated with each of the libraries. Assuming that a browser is equipped to interpret meta-data about this, one approach at assembling the tags is to create a separate NAME attribute value for each library: NAME="law", NAME="main", NAME="engineering", and so on. But it may also be necessary to associate these NAME values with a specific university. The SCHEME attribute could be called into service to align the meta-data with a particular university: SCHEME="Harvard". Now, other university library systems could use the same organization of NAME attributes, but the SCHEME attribute clearly associates a given META element with a specific university and library. Again, this assumes that the browser is empowered to do something special with this meta-knowledge.

 
Example
<META SCHEME="Chicago" NAME="restaurant" CONTENT="1029">
 
Value
Any string identifier.
 
Default None.
Hosted by uCoz