There are two additional header tags that have the primary functions of supporting document automation and interacting with the web server itself and document-generation tools.
Given the rich set of header tags for defining a document and its relationship with others that go unused by most authors, you'd think we'd all be satisfied. But no, there's always someone with special needs. These authors want to be able to give even more information about their precious documents ? information that might be used by browsers, readers of the source, or document-indexing tools. The <meta> tag is for those of you who need to go beyond the beyond.
The <meta> tag belongs in the document header and has no content. Instead, attributes of the tag define name/value pairs that associate the document. In certain cases, these values are used by the web server serving the document to further define the document content type to the browser.
The name attribute supplies the name of the name/value pair defined by the <meta> tag. Neither the HTML nor the XHTML standard specifies any predefined <meta> names. In general, you are free to use any name that makes sense to you and other readers of your source document.
One commonly used name is keywords, which defines a set of keywords for the document. When encountered by any of the popular search engines on the Web, these keywords are used to categorize the document. If you want your documents to be indexed by a search engine, consider putting this kind of tag in the <head> of each document:
<meta name="keywords" content="kumquats, cooking, peeling, eating">
If the name attribute is not provided, the name of the name/value pair is taken from the http-equiv attribute.
The content attribute provides the value of the name/value pair. It can be any valid string (enclosed in quotes if it contains spaces). It should always be specified in conjunction with either a name or http-equiv attribute.
As an example, you might place the author's name in a document with:
<meta name="Authors" content="Chuck Musciano & Bill Kennedy">
The http-equiv attribute supplies a name for the name/value pair and instructs the server to include the name/value pair in the MIME document header that is passed to the browser before sending the actual document.
When a server sends a document to a browser, it first sends a number of name/value pairs. While some servers might send a number of these pairs, all servers send at least one:
This tells the browser to expect to receive an HTML document.
When you use the <meta> tag with the http-equiv attribute, the server will add your name/value pairs to the content header it sends to the browser. For example, adding:
<meta http-equiv="charset" content="iso-8859-1"> <meta http-equiv="expires" content="31 Dec 99">
causes the header sent to the browser to contain:
content-type: text/html charset: iso-8859-1 expires: 31 Dec 99
Of course, adding these additional header fields makes sense only if your browser accepts the fields and uses them in some appropriate manner.
Internet Explorer provides explicit support for a charset attribute in the <meta> tag. Set the value of the attribute to the name of the character set to be used for the document. This is not the recommended way to define a document's character set. Rather, we recommend always using the http-equiv and content attributes to define the character set.
This attribute specifies the scheme to be used to interpret the property's value. This scheme should be defined within the profile specified by the profile attribute of the <head> tag. [Section 3.7.1]
This tag is not defined in the HTML 4 or XHTML standards and should not be used. We describe it here for historical reasons.
The idea behind the <nextid> tag is to provide some way of automatically indexing fragment identifiers.
The n attribute specifies the name of the next generated fragment identifier. It is typically an alphabetic string followed by a two-digit number. A typical <nextid> tag might look like this:
<html> <head> <nextid n=DOC54> </head> ...
An automatic document generator might use the nextid information to successively name fragment identifiers DOC54, DOC55, and so forth within this document.