Contents
This section is normative.
The Document 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 |
---|---|---|
html | Common, version (CDATA), xmlns (URI = "http://www.w3.org/2002/06/xhtml2"), xsi:schemaLocation (URIs = "http://www.w3.org/2002/06/xhtml2 TBD") | head, body |
head | Common | title |
title | Common | (PCDATA | Text)* |
body | Common | ( Heading | Structural | List)* |
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 declaration is defined to be "http://www.w3.org/2002/06/xhtml2". Also note that because the xmlns declaration is treated specially by XML namespace-aware parsers [XMLNS], it is legal to have it present as an attribute of each element. However, any time the xmlns declaration is used in the context of an XHTML module, whether with a prefix or not, the value of the declaration shall be the XHTML namespace defined here.
Implementation: RELAX NG
After the document type declaration, the remainder of an XHTML document is contained by the html element.
Attributes
Need a normative definition for the version attribute
The version attribute needs a machine processable format so that document processors can reliably determine that the document is an XHTML Family conforming document.The head element contains information about the current document, such as its title, that is not considered document content. The default presentation of the head is not to display it; however that can be overridden with a stylesheet for special purpose use. User agents may however make information in the head available to users through other mechanisms.
Attributes
<head> <title>My Life</title> </head>
Every XHTML document must have a title element in the head section.
Attributes
The title element is used to identify the document. Since documents are often consulted 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. The mechanism for doing so depends on the user agent (e.g., as a caption, spoken).
<title>A study of population dynamics</title>
The body of a document contains the document's content. The content may be processed by a user agent in a variety of ways. For example by visual browsers it can be presented as text, images, colors, graphics, etc., an audio user agent may speak the same content, and a search engine may create an index prioritized according to where text appears.
Attributes
<body id="theBody"> <p>A paragraph</p> </body>