2. HTML Specification
Only certain elements are allowed in the head of an HTML document. Elements that may be included in the head of a document are:
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>
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.
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.
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.
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.
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.
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:
<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.
Generated with CERN WebMaker