Go to the first, previous, next, last section, table of contents.

Document Structure Elements

To identify information as an HTML document conforming to this specification, each document should start with the prologue:



HTML user agents are required to support the above document type declaration, the following document type declarations, and no others.


In particular, they may support other formal public identifiers, or document types altogether. They may support an internal declaration subset with supplemental entity, element, and other markup declarations, or they may not.

HTML Document Element

<HTML> ... </HTML> Level 0

The HTML document element is organized as a head and a body, much like a memo or a mail message. Within the head, you can specify the title and other information about the document. Within the body, you can structure text into paragraphs and lists, as well as highlight phrases and create links, using HTML elements.



<HEAD> ... </HEAD> Level 0

The head of an HTML document is an unordered collection of information about the document. The Title element is required.

<TITLE>Introduction to HTML</TITLE>


<BODY> ... </BODY> Level 0

The Body element identifies the body component of an HTML document. Specifically, the body of a document may contain links, text, and formatting information within <BODY> and </BODY> tags.


<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 history lists and as a label for the window displaying the document. Unlike headings, titles are not rendered in the text of a document itself.

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



<BASE> Level 0

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

The Base element has one attribute, HREF, which identifies the absolute base URI.


<ISINDEX> Level 0

The Isindex element tells the interpreter that the document is an index. This means that the reader may request a keyword search on the resource by adding a question mark to the end of the document address, followed by a list of keywords separated by plus signs.

The Isindex element is usually generated by the network server from which the document was obtained via a URI. The server must have a search engine that supports this feature for the resource. If the document URI is unknown to the interpreter, <isindex> must be ignored.


<LINK> Level 0

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.


<META> Level 0

The META element is used within the HEAD element to embed document metainformation not defined by other HTML elements. META elements can be extracted by servers and/or clients for use in identifying, indexing, and cataloging specialized document metainformation.

Although it is generally preferable to use named elements which have well-defined semantics for each type of metainformation (e.g. TITLE), the META element is provided for situations where strict SGML parsing is necessary and the local DTD is not extensible. HTML interpreters may use the META element's content if they recognize and understand the semantics identified by the NAME or HTTP-EQUIV attributes, and may treat the content as metainformation (and not render it) even when they do not recognize the name.

In addition, HTTP servers may wish to read the content of the document HEAD to generate header fields corresponding to any elements defining a value for the attribute HTTP-EQUIV. Note, however, that the method by which the server extracts document metainformation is not part of this specification, nor can it be assumed by authors that any given server will be capable of extracting it. The META element only provides an extensible mechanism for identifying and embedding document metainformation - how it may be used is up to the individual server implementation and the HTML interpreter.

Attributes of the META element:

This attribute binds the element to an HTTP header field. It means that if you know the semantics of the HTTP header field named by this attribute, then you can process the contents based on a well-defined syntactic mapping, whether or not your DTD tells you anything about it. HTTP header field names are not case sensitive. If not present, the attribute NAME should be used to identify this metainformation and the content should not be used within an HTTP response header.
Metainformation name. If the NAME attribute is not present, the name can be assumed to be equal to the value of HTTP-EQUIV.
The metainformation content to be associated with the given name. If multiple META elements are provided with the same name, their combined contents-concatenated as a comma-separated list-is the value associated with that name.


If the document contains:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CONTENT="Tue, 04 Dec 1993 21:29:02 GMT">
<meta http-equiv="Keywords" CONTENT="Fred, Barney">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;content="fielding@ics.uci.edu (Roy Fielding)">

then the server (if so configured) may include the following headers:

Expires: Tue, 04 Dec 1993 21:29:02 GMT
Keywords: Fred, Barney
Reply-to: fielding@ics.uci.edu (Roy Fielding)

as part of the HTTP response to a GET or HEAD request for that document.

When the HTTP-EQUIV attribute is not present, the server should not generate an HTTP response header for the metainformation; e.g.,

<META NAME="IndexType" CONTENT="Service">

would never generate an HTTP response header, but would still allow HTML interpreters to identify and make use of that metainformation.

The Meta element should never be used to define information that should be associated with an existing HTML element. An example of an inappropriate use of the Meta element is:

<META NAME="Title" CONTENT="The Etymology of 

Do not name an HTTP-EQUIV equal to a response header that should normally only be generated by the HTTP server. Example names that are inappropriate include "Server", "Date", and "Last-modified" - the exact list of inappropriate names is dependent on the particular server implementation. We recommend that servers ignore any META elements which specify HTTP-equivalents which are equal (case-insensitively) to their own reserved response headers.


<NEXTID> Level 0

The Nextid element is a parameter read 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:


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 interpreters may ignore the Nextid element. Support for the Nextid element does not impact HTML interpreters in any way.

Go to the first, previous, next, last section, table of contents.