dl Element


 

Module

The dl element is a block-level element declared by the XHTML 1.1 List Module

Elements in the List Module are:
ul | ol | li | dl | dt | dd

Description

The dl element is used to enclose a list of term/definition pairs (which are implemented using the dt and dd elements, respectively).

For example:

<dl>
  <dt>Term A</dt>
    <dd>Definition of Term A</dd>
  <dt>Term B</dt>
    <dd>Definition of Term B</dd>
  <dt>Term C</dt>
    <dd>Definition of Term C</dd>
</dl>

This definition list renders as follows:

Term A
Definition of Term A
Term B
Definition of Term B
Term C
Definition of Term C

The dd elements are usually indented by the browser - the list above is not styled and so the appearance above is your browser's default behaviour. Definition lists should not be used in cases where the visual effect of indentation is desired but the content is not a series of term/definition pairs: use CSS instead. Apart from anything else, different browsers may render definition lists in different ways and the appearance may not be consistent.

Note that a definition list will be valid XHTML 1.1 as long as it contains any number of dt and dd elements in any order (as long as the list is not empty). It does not make logical sense, however, unless the items are arranged in term/definition pairs.

See also the dfn element.

#REQUIRED Attributes

There are no #REQUIRED attributes on the dl element.


Specific Attributes

There are no specific attributes declared on the dl element.


Common Attributes

Common attributes of the dl element are listed below:

From the Core Attribute Collection

class [ type NMTOKENS ]
One or more space separated classes
id [ type ID ]
A unique identifier for the element
style [ type CDATA ], from the Style Attribute Module (deprecated)
Element-specific styles
title [ type Text ]
Descriptive title for the element (in some user agents this may appear as a "tooltip" when the mouse hovers over the element)
xmlns [ type URI - #FIXED 'http://www.w3.org/1999/xhtml' ]
XML namespace

From the I18N Attribute Collection

dir [ type Enumeration (ltr | rtl) ], from the Bi-directional Text Module
Left-to-right or right-to-left directionality
xml:lang [ type LanguageCode ]
A language code for the element

From the Events Attribute Collection

All attributes in the Events Attribute Collection are supported:
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup


Content Model

The Content Model for the dl element is:

( dt | dd )+

NOTE: This element cannot be empty

See Content Model & Nesting for information about Content Model syntax and Nesting Groups.

Valid children of dl

Valid parents of dl


Page Footer & Copyright

Copyright © Sally Maughan 2005-2009 (Page last updated on 01 Oct 2009)

*Valid XHTML 1.1 - hosted by *Openstrike

Content based on the W3C Working Draft: *XHTML 1.1 and Recommendation: *XHTML Modularisation 1.1.

W3C, XHTML, XML, HTML, CSS and MathML are *Trademarks of the W3C (*MIT, *ERCIM, *Keio) with which the site's author has no connection.


Up, Next & Previous Links

Your Location

Home > XHTML 1.1 Home > XHTML 1.1 Indexes > Element Index (XHTML 1.1) > dl Element