dl ElementThe 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
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:
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.
There are no #REQUIRED attributes on the dl element.
There are no specific attributes declared on the dl element.
dl element are listed below:class [ type NMTOKENS ]id [ type ID ]style [ type CDATA ], from the Style Attribute Module (deprecated)title [ type Text ]xmlns [ type URI - #FIXED 'http://www.w3.org/1999/xhtml' ]dir [ type Enumeration (ltr | rtl) ], from the Bi-directional Text Modulexml:lang [ type LanguageCode ]All attributes in the
Events Attribute Collection
are supported:onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup
dl element is:
NOTE: This element cannot be empty
See Content Model & Nesting for information about Content Model syntax and Nesting Groups.
dldd, dtdlbodyblockquote, divdd, litd, thbutton, fieldset, formmapnoscriptdel, insobject