Contents
This section is normative.
The Structure Module defines the major structural elements for XHTML. These elements effectively act as the basis for the content model of many XHTML family document types. The elements and attributes included in this module are:
Elements | Attributes | Minimal Content Model |
---|---|---|
body | Common | (Heading | Block | List)* |
head | Common | title |
html | I18N, profile (URI), xmlns (URI = "http://www.w3.org/2002/06/xhtml2") | head, body |
title | I18N | PCDATA |
This module is the basic structural definition for XHTML content. The html
element acts as the root element for all XHTML Family Document Types.
Note that the value of the xmlns attribute is defined to be "http://www.w3.org/2002/06/xhtml2". Also note that because the xmlns attribute is treated specially by XML namespace-aware parsers [XMLNAMES], it is legal to have it present as an attribute of each element. However, any time the xmlns attribute is used in the context of an XHTML module, whether with a prefix or not, the value of the attribute shall be the XHTML namespace defined here.
Implementation: DTD
After the document type declaration, the remainder of an XHTML document is contained by the html element.
Attributes
The head element contains information about the current document, such as its title, keywords that may be useful to search engines, and other data that is not considered document content. User agents do not generally render elements that appear in the head as content. They may, however, make information in the head available to users through other mechanisms.
Attributes
Every XHTML document must have a title element in the head section.
Attributes
Authors should use the title element to identify the contents of a document. Since users often consult documents out of context, authors should provide context-rich titles. Thus, instead of a title such as "Introduction", which doesn't provide much contextual background, authors should supply a title such as "Introduction to Medieval Bee-Keeping" instead.
For reasons of accessibility, user agents must always make the content of the title element available to users (including title elements that occur in frames). The mechanism for doing so depends on the user agent (e.g., as a caption, spoken).
Titles may contain entity references (for accented characters, special characters, etc.), but may not contain other markup (including comments). Here is a sample document title:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 2.0//EN" "http://www.w3.org/TR/xhtml2/DTD/xhtml2.dtd"> <html xmlns="http://www.w3.org/2002/06/xhtml2"> <head> <title>A study of population dynamics</title> ... other head elements... </head> <body> ... document body... </body> </html>
The body of a document contains the document's content. The content may be presented by a user agent in a variety of ways. For example, for visual browsers, you can think of the body as a canvas where the content appears: text, images, colors, graphics, etc. For audio user agents, the same content may be spoken.
Attributes