7. XHTML Document Module

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 Content Model
html Common, version (CDATA), xmlns (URI = "http://www.w3.org/1999/xhtml"), xsi:schemaLocation (URIs = "http://www.w3.org/1999/xhtml http://www.w3.org/MarkUp/SCHEMA/xhtml2.xsd") head, body
head Common title , ( access | handler | link | ev:listener | model | meta | style ) *
title Common PCDATA*
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/1999/xhtml". 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 must be http://www.w3.org/1999/xhtml.

Implementation: RELAX NG

7.1. The html element

The html element is the root element for all XHTML Family Document Types. The xml:lang attribute is required on this element.

Attributes

The Common collection
A collection of other attribute collections, including: Bi-directional, Core, Edit, Embedding, Events, Forms, Hypertext, I18N, Map, and Metainformation.
version = CDATA
The value of this attribute specifies which XHTML Family document type governs the current document. The format of this attribute value is unspecified. However, all values beginning with the character sequence xhtml are reserved for use by XHTML Family Document Types.

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.
xsi:schemaLocation = URIs
This attribute allows the specification of a location where an XML Schema [XMLSCHEMA] for the document can be found. The syntax of this attribute is defined in xsi_schemaLocation. The behavior of this attribute in XHTML documents is defined in Strictly Conforming Documents.

7.2. The head element

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 style sheet for special purpose use. User agents may however make information in the head available to users through other mechanisms.

Attributes

The Common collection
A collection of other attribute collections, including: Bi-directional, Core, Edit, Embedding, Events, Forms, Hypertext, I18N, Map, and Metainformation.

Example

<head>
    <title>My Life</title>
</head>

7.3. The title element

Every XHTML document must have a title element in the head section.

Attributes

The Common collection
A collection of other attribute collections, including: Bi-directional, Core, Edit, Embedding, Events, Forms, Hypertext, I18N, Map, and Metainformation.

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).

Example

<title>A study of population dynamics</title>

The title of a document is metadata about the document, and so a title like <title>About W3C</title> is equivalent to <meta about="" property="title">About W3C</meta>.

7.4. The body element

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 properties of the text.

Attributes

The Common collection
A collection of other attribute collections, including: Bi-directional, Core, Edit, Embedding, Events, Forms, Hypertext, I18N, Map, and Metainformation.

Example

<body id="theBody">
    <p>A paragraph</p>
</body>