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
The html element is the root element for all XHTML Family Document Types. The xml:lang attribute is required on this 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 style sheet for special purpose use. User agents may however make information in the head available to users through other mechanisms.
Attributes
Example
<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).
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>
.
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
Example
<body id="theBody"> <p>A paragraph</p> </body>