[Next] [Previous] [Up] [Top]

2. HTML Specification

2.7 The Head Element and Related Elements

2.7.1 - Head
2.7.2 - Base
2.7.3 - Isindex
2.7.4 - Link
2.7.5 - Nextid
2.7.6 - Title
2.7.7 - Meta

Only certain elements are allowed in the head of an HTML document. Elements that may be included in the head of a document are:


2.7.1 Head

<HEAD> ... </HEAD>

Level 0

The head of an HTML document is an unordered collection of information about the document. It requires the Title element between <HEAD> and </HEAD> tags in this format:

<HEAD>
<TITLE>Introduction to HTML</TITLE>
</HEAD>

2.7.2 Base

Level 0

The Base element allows the URL of the document itself to be recorded in situations in which the document may be read out of context. URLs within the document may be in a "partial" form relative to this base address.

Where the base address is not specified, the HTML user agent uses the URL it used to access the document to resolve any relative URLs.

The Base element has one attribute, HREF, which identifies the URL.


2.7.3 Isindex

Level 0

The Isindex element tells the HTML user agent that the document is an index document. As well as reading it, the reader may use a keyword search.

The document can be queried with a keyword search by adding a question mark to the end of the document address, followed by a list of keywords separated by plus signs.

NOTE: The Isindex element is usually generated automatically by a server. If added manually to an HTML document, the HTML user agent assumes that the server can handle a search on the document. To use the Isindex element, the server must have a search engine that supports this element.


2.7.4 Link

Level 1

The Link element indicates a relationship between the document and some other object. A document may have any number of Link elements.

The Link element is empty (does not have a closing tag), but takes the same attributes as the Anchor element.

Typical uses are to indicate authorship, related indexes and glossaries, older or more recent versions, etc. Links can indicate a static tree structure in which the document was authored by pointing to a "parent" and "next" and "previous" document, for example.

Servers may also allow links to be added by those who do not have the right to alter the body of a document.


2.7.5 Nextid

Level 0

The Nextid element is a parameter read by and generated by text editing software to create unique identifiers. This tag takes a single attribute which is the next document-wide alpha-numeric identifier to be allocated of the form z123:

<NEXTID N=Z27>
When modifying a document, existing anchor identifiers should not be reused, as these identifiers may be referenced by other documents. Human writers of HTML usually use mnemonic alphabetical identifiers.

HTML user agents may ignore the Nextid element. Support for the Nextid element does not impact HTML user agents in any way.


2.7.6 Title

<TITLE> ... </TITLE>

Level 0

Every HTML document must contain a Title element. The title should identify the contents of the document in a global context, and may be used in a history lists and as a label for the window displaying the document. Unlike headings, titles are not typically rendered in the text of a document itself.

The Title element must occur within the head of the document, and may not contain anchors, paragraph tags, or highlighting. Only one title is allowed in a document.

NOTE: The length of a title is not limited; however, long titles may be truncated in some applications. To minimize this possibility, titles should be fewer than 64 characters. Also keep in mind that a short title, such as Introduction, may be meaningless out of context. An example of a meaningful title might be "Introduction to HTML Elements."


2.7.7 Meta

Level 1

The Meta element is used within the Head element to embed document meta-information not defined by other HTML elements. Such information can be extracted by servers/clients for use in identifying, indexing, and cataloging specialized document meta-information.

Although it is generally preferable to use named elements that have well-defined semantics for each type of meta-information, such as a title, this element is provided for situations where strict SGML parsing is necessary and the local DTD is not extensible.

In addition, HTTP servers can read the content of the document head to generate response headers corresponding to any elements defining a value for the attribute HTTP-EQUIV. This provides document authors a mechanism (not necessarily the preferred one) for identifying information that should be included in the response headers for an HTTP request.

Attributes of the Meta element:

HTTP-EQUIV
This attribute binds the element to an HTTP response header. If the semantics of the HTTP response header named by this attribute is known, then the contents can be processed based on a well-defined syntactic mapping whether or not the DTD includes anything about it. HTTP header names are not case sensitive. If not present, the NAME attribute should be used to identify this meta-information and it should not be used within an HTTP response header.

NAME
Meta-information name. If the NAME attribute is not present, the name can be assumed equal to the value of HTTP-EQUIV.

CONTENT
The meta-information content to be associated with the given name and/or HTTP response header.

Examples

If the document contains:

<META HTTP-EQUIV="Expires" CONTENT="Tue, 04 Dec 1993 21:29:02 GMT">
<META HTTP-EQUIV="Keywords" CONTENT="Fred, Barney">
<META HTTP-EQUIV="Reply-to" content="fielding@ics.uci.edu (Roy Fielding)">

Expires: Tue, 04 Dec 1993 21:29:02 GMT
Keywords: Fred, Barney
Reply-to: fielding@ics.uci.edu (Roy Fielding)
When the HTTP-EQUIV attribute is not present, the server should not generate an HTTP response header for this meta-information; e.g.,

<META NAME="IndexType" CONTENT="Service">
Do not use the Meta element to define information that should be associated with an existing HTML element.

Example of an inappropriate use of the Meta element:

<META NAME="Title" CONTENT="The Etymology of Dunsel">
Do not name an HTTP-EQUIV equal to a response header that should typically only be generated by the HTTP server. Some inappropriate names are "Server", "Date", and "Last-modified". Whether a name is inappropriate depends on the particular server implementation. It is recommended that servers ignore any Meta elements that specify HTTP-equivalents equal (case-insensitively) to their own reserved response headers.


HTML 2.0 Specification (Internet Draft) - 29 NOV 94
[Next] [Previous] [Up] [Top]

Generated with CERN WebMaker