5. XHTML Abstract Modules

Contents

This section is normative.

This section specifies the contents of the XHTML abstract modules. These modules are abstract definitions of collections of elements, attributes, and their content models. These abstract modules can be mapped onto any appropriate specification mechanism. XHTML DTD Module Implementations, for example, maps these modules onto DTDs as described in [XML].

Content developers and device designers should view this section as a guide to the definition of the functionality provided by the various XHTML-defined modules. When developing documents or defining a profile for a class of documents, content developers can determine which of these modules are essential for conveying their message. When designing clients, device designers should develop their device profiles by choosing from among the abstract modules defined here.

Except when overridden in this document, the semantics of these elements and attributes are defined in [HTML4].

5.1. Attribute Collections

Many of the abstract modules in this section define the required attributes for elements. The table below defines some collections of attributes that are referenced throughout the modules. These expressions should in no way be considered normative or mandatory. They are an editorial convenience for this document. When used in the remainder of this section, it is the expansion of the term that is normative, not the term itself.

The following basic attribute sets are used on many elements. In each case where they are used, their use is identified via their collection name rather than enumerating the list.

Collection Name Attributes in Collection
Core class (NMTOKENS), id (ID), title (CDATA)
I18N xml:lang (NMTOKEN)
Events onclick (Script), ondblclick (Script), onmousedown (Script), onmouseup (Script), onmouseover (Script), onmousemove (Script), onmouseout (Script), onkeypress (Script), onkeydown (Script), onkeyup (Script)
Style style (CDATA)
Common Core + Events + I18N + Style

Note that the Events collection is only defined when the Intrinsic Events Module is selected. Otherwise, the Events collection is empty.

Also note that the Style collection is only defined when the Style Attribute Module is selected. Otherwise, the Style collection is empty.

5.2. Core Modules

The core modules are modules that are required to be present in any XHTML Family Conforming Document Type.

5.2.1. Structure Module

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 I18N, profile (URI) title
html I18N, version (CDATA), xmlns (URI = "http://www.w3.org/1999/xhtml") 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/1999/xhtml". 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. See Defining the Namespace of a Module for more on rules regarding namespace usage with XHTML family modules.

Implementation: DTD

5.2.2. Text Module

This module defines all of the basic text container elements, attributes, and their content model:

Element Attributes Minimal Content Model
abbr Common (PCDATA | Inline)*
acronym Common (PCDATA | Inline)*
address Common (PCDATA | Inline)*
blockquote Common, cite (URI) (PCDATA | Heading | Block | List)*
br Core EMPTY
cite Common (PCDATA | Inline)*
code Common (PCDATA | Inline)*
dfn Common (PCDATA | Inline)*
div Common (PCDATA | Flow)*
em Common (PCDATA | Inline)*
h1 Common (PCDATA | Inline)*
h2 Common (PCDATA | Inline)*
h3 Common (PCDATA | Inline)*
h4 Common (PCDATA | Inline)*
h5 Common (PCDATA | Inline)*
h6 Common (PCDATA | Inline)*
kbd Common (PCDATA | Inline)*
p Common (PCDATA | Inline)*
pre Common, xml:space="preserve" (PCDATA | Inline)*
q Common, cite (URI) (PCDATA | Inline)*
samp Common (PCDATA | Inline)*
span Common (PCDATA | Inline)*
strong Common (PCDATA | Inline)*
var Common (PCDATA | Inline)*

The minimal content model for this module defines some content sets:

Heading
h1 | h2 | h3 | h4 | h5 | h6
Block
address | blockquote | div | p | pre
Inline
abbr | acronym | br | cite | code | dfn | em | kbd | q | samp | span | strong | var
Flow
Heading | Block | Inline

Implementation: DTD

5.2.3. Hypertext Module

The Hypertext Module provides the element that is used to define hypertext links to other resources. This module supports the following element and attributes:

Element Attributes Minimal Content Model
a Common, accesskey (Character), charset (Charset), href (URI), hreflang (LanguageCode), rel (LinkTypes), rev (LinkTypes), tabindex (Number), type (ContentType) (PCDATA | Inline - a)*

This module adds the a element to the Inline content set of the Text Module.

Implementation: DTD

5.2.4. List Module

As its name suggests, the List Module provides list-oriented elements. Specifically, the List Module supports the following elements and attributes:

Elements Attributes Minimal Content Model
dl Common (dt | dd)+
dt Common (PCDATA | Inline)*
dd Common (PCDATA | Flow)*
ol Common li+
ul Common li+
li Common (PCDATA | Flow)*

This module also defines the content set List with the minimal content model (dl | ol | ul)+ and adds this set to the Flow content set of the Text Module.

Implementation: DTD

5.3. Applet Module

This module is deprecated. Similar functionality can be found in the Object Module.

The Applet Module provides elements for referencing external applications. Specifically, the Applet Module supports the following elements and attributes:

Element Attributes Minimal Content Model
applet Core, alt* (Text), archive (CDATA), code (CDATA), codebase (URI), height* (Length), object (CDATA), width* (Length) (PCDATA | Flow | param)*
param id (ID), name* (CDATA), type (ContentType), value (CDATA), valuetype ("data"* | "ref" | "object") EMPTY

When the Applet Module is used, it adds the applet element to the Inline content set of the Text Module.

Implementation: DTD

5.4. Text Extension Modules

This section defines a variety of additional textual markup modules.

5.4.1. Presentation Module

This module defines elements, attributes, and a minimal content model for simple presentation-related markup:

Element Attributes Minimal Content Model
b Common (PCDATA | Inline)*
big Common (PCDATA | Inline)*
hr Common EMPTY
i Common (PCDATA | Inline)*
small Common (PCDATA | Inline)*
sub Common (PCDATA | Inline)*
sup Common (PCDATA | Inline)*
tt Common (PCDATA | Inline)*

When this module is used, the hr element is added to the Block content set of the Text Module. In addition, the b, big, i, small, sub, sup, and tt elements are added to the Inline content set of the Text Module.

Implementation: DTD

5.4.2. Edit Module

This module defines elements and attributes for use in editing-related markup:

Element Attributes Minimal Content Model
del Common, cite (URI), datetime (Datetime) (PCDATA | Flow)*
ins Common, cite (URI), datetime (Datetime) (PCDATA | Flow)*

When this module is used, the del and ins elements are added to the Inline content set of the Text Module.

Implementation: DTD

5.4.3. Bi-directional Text Module

The Bi-directional Text module defines an element that can be used to declare the bi-directional rules for the element's content.

Elements Attributes Minimal Content Model
bdo Core, dir* ("ltr" | "rtl") (PCDATA | Inline)*

When this module is used, the bdo element is added to the Inline content set of the Text Module. Selecting this module also adds the attribute dir* ("ltr" | "rtl") to the I18N attribute collection.

Implementation: DTD

5.5. Forms Modules

5.5.1. Basic Forms Module

The Basic Forms Module provides the form-related elements, but only in a limited form. Specifically, the Basic Forms Module supports the following elements, attributes, and minimal content model:

Elements Attributes Minimal Content Model
form Common, action* (URI), method ("get"* | "post"), enctype (ContentType) (Heading | List | Block - form)+
input Common, accesskey (Character), checked ("checked"), maxlength (Number), name (CDATA), size (Number), src (URI), tabindex (Number), type ("text"* | "password" | "checkbox" | "radio" | "submit" | "reset" | "hidden" ), value (CDATA) EMPTY
label Common, accesskey (Character), for (IDREF) (PCDATA | Inline - label)*
select Common, multiple ("multiple"), name (CDATA), size (Number), tabindex (Number) option+
option Common, selected ("selected"), value (CDATA) PCDATA
textarea Common, accesskey (Character), cols* (Number), name (CDATA), rows* (Number), tabindex (Number) PCDATA

This module defines two content sets:

Form
form
Formctrl
input | label | select | textarea

When this module is used, it adds the Form content set to the Block content set and it adds the Formctrl content set to the Inline content set as these are defined in the Text Module.

Implementation: DTD

5.5.2. Forms Module

The Forms Module provides all of the forms features found in HTML 4.0. Specifically, the Forms Module supports:

Elements Attributes Minimal Content Model
form Common, accept (ContentTypes), accept-charset (Charsets), action* (URI), method ("get"* | "post"), enctype (ContentType) (Heading | List | Block - form | fieldset)+
input Common, accept (ContentTypes), accesskey (Character), alt (Text), checked ("checked"), disabled ("disabled"), maxlength (Number), name (CDATA), readonly ("readonly"), size (Number), src (URI), tabindex (Number), type ("text"* | "password" | "checkbox" | "button" | "radio" | "submit" | "reset" | "file" | "hidden" | "image"), value (CDATA) EMPTY
select Common, disabled ("disabled"), multiple ("multiple"), name (CDATA), size (Number), tabindex (Number) (optgroup | option)+
option Common, disabled ("disabled"), label (Text), selected ("selected"), value (CDATA) PCDATA
textarea Common, accesskey (Character), cols* (Number), disabled ("disabled"), name (CDATA), readonly ("readonly"), rows* (Number), tabindex (Number) PCDATA
button Common, accesskey (Character), disabled ("disabled"), name (CDATA), tabindex (Number), type ("button" | "submit"* | "reset"), value (CDATA) (PCDATA | Heading | List | Block - Form | Inline - Formctrl)*
fieldset Common (PCDATA | legend | Flow)*
label Common, accesskey (Character), for (IDREF) (PCDATA | Inline - label)*
legend Common, accesskey (Character) (PCDATA | Inline)+
optgroup Common, disabled ("disabled"), label* (Text) option+

This module defines two content sets:

Form
form | fieldset
Formctrl
input | select | textarea | label | button

When this module is used, it adds the Form content set to the Block content set and it adds the Formctrl content set to the Inline content set as these are defined in the Text Module.

The Forms Module is a superset of the Basic Forms Module. These modules may not be used together in a single document type.

Implementation: DTD

5.6. Table Modules

5.6.1. Basic Tables Module

The Basic Tables Module provides table-related elements, but only in a limited form. Specifically, the Basic Tables Module supports:

Elements Attributes Minimal Content Model
caption Common (PCDATA | Inline)*
table Common , summary ( Text ), width ( Length ) caption?, tr+
td Common, abbr (Text), align ("left" | "center" | "right"), axis (CDATA), colspan (Number), headers (IDREFS), rowspan (Number), scope ("row" | "col"), valign ("top" | "middle" | "bottom") (PCDATA | Flow - table)*
th Common, abbr (Text), align ("left" | "center" | "right"), axis (CDATA), colspan (Number), headers (IDREFS), rowspan (Number), scope ("row" | "col" ), valign ("top" | "middle" | "bottom") (PCDATA | Flow - table)*
tr Common, align ("left" | "center" | "right"), valign ("top" | "middle" | "bottom") (td | th)+

When this module is used, it adds the table element to the Block content set as defined in the Text Module.

Implementation: DTD

5.6.2. Tables Module

As its name suggests, the Tables Module provides table-related elements that are better able to be accessed by non-visual user agents. Specifically, the Tables Module supports the following elements, attributes, and content model:

Elements Attributes Minimal Content Model
caption Common (PCDATA | Inline)*
table Common, border (Pixels), cellpadding (Length), cellspacing (Length), datapagesize (CDATA), frame ("void" | "above" | below" | "hsides" | "lhs" | "rhs" | "vsides" | "box" | "border"), rules ("none" | "groups" | "rows" | "cols" | "all"), summary (Text), width (Length) caption?, ( col* | colgroup* ), (( thead?, tfoot?, tbody+ ) | ( tr+ ))
td Common, abbr (Text), align ("left" | "center" | "right" | "justify" | "char"), axis (CDATA), char (Character), charoff (Length), colspan (Number), headers (IDREFS), rowspan (Number), scope ("row", "col", "rowgroup", "colgroup"), valign ("top" | "middle" | "bottom" | "baseline") (PCDATA | Flow)*
th Common, abbr (Text), align ("left" | "center" | "right" | "justify" | "char"), axis (CDATA), char (Character), charoff (Length), colspan (Number), headers (IDREFS), rowspan (Number), scope ("row", "col", "rowgroup", "colgroup"), valign ("top" | "middle" | "bottom" | "baseline") (PCDATA | Flow)*
tr Common, align ("left" | "center" | "right" | "justify", "char"), char (Character), charoff (Length), valign ("top" | "middle" | "bottom" | "baseline") (td | th)+
col Common, align ("left" | "center" | "right" | "justify", "char"), char (Character), charoff (Length), span (Number), valign ("top" | "middle" | "bottom" | "baseline"), width (MultiLength) EMPTY
colgroup Common, align ("left" | "center" | "right" | "justify", "char"), char (Character), charoff (Length), span (Number), valign ("top" | "middle" | "bottom" | "baseline"), width (MultiLength) col*
tbody Common, align ("left" | "center" | "right" | "justify", "char"), char (Character), charoff (Length), valign ("top" | "middle" | "bottom" | "baseline") tr+
thead Common, align ("left" | "center" | "right" | "justify", "char"), char (Character), charoff (Length), valign ("top" | "middle" | "bottom" | "baseline") tr+
tfoot Common, align ("left" | "center" | "right" | "justify", "char"), char (Character), charoff (Length), valign ("top" | "middle" | "bottom" | "baseline") tr+

When this module is used, it adds the table element to the Block content set of the Text Module.

Implementation: DTD

5.7. Image Module

The Image Module provides basic image embedding, and may be used in some implementations independently of client side image maps. The Image Module supports the following element and attributes:

Elements Attributes Minimal Content Model
img Common, alt* (Text), height (Length), longdesc (URI), src* (URI), width (Length) EMPTY

When this module is used, it adds the img element to the Inline content set of the Text Module.

Implementation: DTD

5.8. Client-side Image Map Module

The Client-side Image Map Module provides elements for client side image maps. It requires that the Image Module (or another module that supports the img element) be included. The Client-side Image Map Module supports the following elements:

Elements Attributes Minimal Content Model
a& coords (CDATA), shape ("rect" | "circle" | "poly" | "default") n/a
area Common, accesskey (Character), alt* (Text), coords (CDATA), href (URI), nohref ("nohref"), shape ("rect"* | "circle" | "poly" | "default"), tabindex (Number) EMPTY
img& usemap (IDREF) n/a
input& usemap (IDREF) n/a
map I18N, Events, class (NMTOKEN), id* (ID), title (CDATA) ((Heading | Block) | area)+
object& usemap (IDREF) Note: Only when the object module is included

When this module is used, the map element is added to the Inline content set of the Text Module.

Implementation: DTD

5.9. Server-side Image Map Module

The Server-side Image Map Module provides support for image-selection and transmission of selection coordinates. It requires that the Image Module (or another module that supports the img element) be included. The Server-side Image Map Module supports the following attributes:

Elements Attributes Minimal Content Model Notes
img& ismap ("ismap") n/a  
input& ismap ("ismap") n/a When the Forms or Basic Forms Module is selected.

Implementation: DTD

5.10. Object Module

The Object Module provides elements for general-purpose object inclusion. Specifically, the Object Module supports:

Elements Attributes Minimal Content Model
object Common, archive (URIs), classid (URI), codebase (URI), codetype (ContentType), data (URI), declare ("declare"), height (Length), name (CDATA), standby (Text), tabindex (Number), type (ContentType), width (Length) (PCDATA | Flow | param)*
param id (ID), name* (CDATA), type (ContentType), value (CDATA), valuetype ("data"* | "ref" | "object") EMPTY

When this module is used, it adds the object element to the Inline content set of the Text Module.

Implementation: DTD

5.11. Frames Module

As its name suggests, the Frames Module provides frame-related elements. Specifically, the Frames Module supports:

Elements Attributes Minimal Content Model
frameset Core , cols ( MultiLength ), rows ( MultiLength ) (frameset | frame)+, noframes?
frame Core , frameborder ("1" | "0"), longdesc ( URI ), marginheight ( Pixels ), marginwidth ( Pixels ), noresize ("noresize"), scrolling ("yes" | "no" | "auto"*), src ( URI ) EMPTY
noframes Common body

When this module is selected, the minimal content model of the html element of the Structure Module is changed to (head, frameset).

Implementation: DTD

5.12. Target Module

The content of a frame can specify destination targets for a selection. This module adds the target element to the area and link defining elements. This is defined as a separate module so it can be included in documents that will be included in frames and documents that use the target feature to open a new window.

Elements Attributes Notes
a& target ( CDATA )  
area& target ( CDATA ) When the Client-side Image Map Module is selected.
base& target ( CDATA ) When the Legacy Module is selected.
link& target ( CDATA ) When the Link Module is selected.
form& target ( CDATA ) When the Basic Forms or Forms module is selected.

Implementation: DTD

5.13. Iframe Module

The Iframe Module defines an element for the definition of inline frames. The element and attribute included in this module are:

Elements Attributes Minimal Content Model
iframe Core, frameborder ("1" | "0"), height (Length), longdesc (URI), marginheight (Pixels), marginwidth (Pixels), scrolling ("yes" | "no" | "auto"*), src (URI), width (Length) (PCDATA | Flow)*

When this module is used, the iframe element is added to the Inline content set as defined by the Text Module.

Implementation: DTD

5.14. Intrinsic Events Module

Intrinsic events are attributes that are used in conjunction with elements that can have specific events occur when certain actions are performed by the user. The attributes indicated in the following table are added to the attribute set for their respective elements only when the modules defining those elements are selected. Note also that selection of this module defines the attribute collection Events as described above. Attributes defined by this module are:

Elements Attributes Notes
a& onblur (Script), onfocus (Script)  
area& onblur (Script), onfocus (Script) When the Client-side Image Map Module is also used
frameset& onload (Script), onunload (Script) When the Frames Module is also used.
form& onreset (Script), onsubmit (Script) When the Basic Forms or Forms Module is used
body& onload (Script), onunload (Script)  
label& onblur (Script), onfocus (Script) When the Forms Module is used
input& onblur (Script), onchange (Script), onfocus (Script), onselect (Script) When the Basic Forms or Forms Module is used
select& onblur (Script), onchange (Script), onfocus (Script) When the Basic Forms or Forms Module is used
textarea& onblur (Script), onchange (Script), onfocus (Script), onselect (Script) When the Basic Forms or Forms Module is used
button& onblur (Script), onfocus (Script) When the Forms Module is used

Implementation: DTD

5.15. Metainformation Module

The Metainformation Module defines an element that describes information within the declarative portion of a document (in XHTML within the head element). This module includes the following element:

Elements Attributes Minimal Content Model
meta I18N, content* (CDATA), http-equiv (NMTOKEN), name (NMTOKEN), scheme (CDATA) EMPTY

When this module is selected, the meta element is added to the content model of the head element as defined in the Structure Module.

Implementation: DTD

5.16. Scripting Module

The Scripting Module defines elements that are used to contain information pertaining to executable scripts or the lack of support for executable scripts. Elements and attributes included in this module are:

Elements Attributes Minimal Content Model
noscript Common (Heading | List | Block)+
script charset (Charset), defer ("defer"), src (URI), type* (ContentType), xml:space="preserve" PCDATA

When this module is used, the script and noscript elements are added to the Block and Inline content sets of the Text Module. In addition, the script element is added to the content model of the head element defined in the Structure Module.

Implementation: DTD

5.17. Style Sheet Module

The Style Sheet Module defines an element to be used when declaring internal style sheets. The element and attributes defined by this module are:

Elements Attributes Minimal Content Model
style I18N, media (MediaDesc), title (Text), type* (ContentType), xml:space="preserve" PCDATA

When this module is used, it adds the style element to the content model of the head element of the Structure Module.

Implementation: DTD

5.18. Style Attribute Module

The Style Attribute Module defines the style attribute. When this module is selected, it activates the Style Attribute Collection.

Implementation: DTD

5.19. Link Module

The Link Module defines an element that can be used to define links to external resources. These resources are often used to augment the user agent's ability to process the associated XHTML document. The element and attributes included in this module are:

Elements Attributes Minimal Content Model
link Common, charset (Charset), href (URI), hreflang (LanguageCode), media (MediaDesc), rel (LinkTypes), rev (LinkTypes), type (ContentType) EMPTY

When this module is used, it adds the link element to the content model of the head element as defined in the Structure Module.

Implementation: DTD

5.20. Base Module

The Base Module defines an element that can be used to define a base URI against which relative URIs in the document will be resolved. The element and attribute included in this module are:

Elements Attributes Minimal Content Model
base href* (URI) EMPTY

When this module is used, it adds the base element to the content model of the head element of the Structure Module.

Implementation: DTD

5.21. Name Identification Module

This module is deprecated.

The Name Identification Module defines the attribute name for a collection of elements. The name attribute was used historically to identify certain elements within HTML documents. While the name attribute has been supplanted by the id attribute in all of these elements, there may be instances where markup languages will wish to support both. Such markup languages may do so by including this module.

Note that by including this module, both the name and id attributes are defined for the elements indicated. In this situation, if the name attribute is defined for an element, the id attribute must also be defined. Further, these attributes must both have the same value. Finally, when documents that use this attribute are served as Internet Media Type "text/xml" or "application/xml", the value of the name attribute on these elements shall not be used as a fragment identifier.

Elements Attributes Notes
a& name (CDATA)  
applet& name (CDATA) When the Applet Module is selected.
form& name (CDATA) When the Forms or Basic Forms Module is selected. 
frame& name (CDATA) When the Frames Module is selected. 
iframe& name (CDATA) When the Iframe Module is selected. 
img& name (CDATA) When the Image Module is selected. 
map& name (CDATA) When the Client-side Image Map Module is selected.

Implementation: DTD

5.22. Legacy Module

The Legacy Module defines elements and attributes that were already deprecated in previous versions of HTML and XHTML, and remain deprecated in XHTML Modularization. Markup language authors should no longer use these elements and attributes.

The following table defines the elements and attributes that are defined when the Legacy Module is selected.

Elements Attributes Minimal Content Model
basefont color (Color), face (CDATA), id (ID), size (CDATA) EMPTY
center Common (PCDATA | Flow)*
dir Common, compact ("compact") (li)+
font Core, I18N, color (Color), face (CDATA), size (CDATA) (PCDATA | Inline)*
isindex Core, I18N, prompt (Text) EMPTY
menu Common, compact ("compact") (li)+
s Common (PCDATA | Inline)*
strike Common (PCDATA | Inline)*
u Common (PCDATA | Inline)*

The following table shows additional attributes for elements defined elsewhere when the Legacy module is selected.

Elements Attributes Notes
body& alink (Color), background (URI), bgcolor (Color), link (Color), text (Color), vlink (Color)  
br& clear ("left" | "all" | "right" | "none"*)  
caption& align ("top" | "bottom" | "left" | "right")  
div& align ("left" | "center" | "right" | "justify")  
dl& compact ("compact"), type (CDATA)  
h1-h6& align ("left" | "center" | "right" | "justify")  
hr& align ("left" | "center" | "right" | "justify"), noshade ("noshade"), size (Pixels), width (Length),  
img& align ("left" | "center" | "right" | "justify"), border (Pixels), hspace (Pixels), vspace (Pixels)  
input& align ("top" | "middle" | "bottom" | "left" | "right") When the Basic Forms or Forms Module is selected.
legend& align ("left" | "center" | "right" | "justify") When the Forms Module is selected.
li& type (CDATA), value (Number)  
ol& compact ("compact"), start (Number), type (CDATA)  
p& align ("left" | "center" | "right", "justify")  
pre& width (Number)  
script& language (CDATA) When the Scripting module is selected.
table& align ("left" | "center" | "right"), bgcolor (Color) When the Tables module is selected.
tr& bgcolor (Color) When the Tables module is selected.
th& bgcolor (Color), height (Pixels) nowrap ("nowrap"), width (Length) When the Tables module is selected.
td& bgcolor (Color), height (Length) nowrap ("nowrap"), width (Pixels) When the Tables module is selected.
ul& compact ("compact"), type (CDATA)  

Implementation: DTD