A definition list is a list of terms and corresponding definitions. Definition lists are typically formatted with the term flush-left and the definition, formatted paragraph style, indented after the term.
Example of use:
<DL>
<DT><PRE><DD>Allows for the presentation of preformatted text.
<DT><P><DD>This is used to define paragraph blocks.
</DL>
Would render as:
If the <DT>
term does not fit in the <DT>
column (one third of the display area), it may be extended across the page with the <DD>
section moved to the next line, or it may be wrapped onto successive lines of the left hand column.
The opening list element must be <DL>
and must be immediately followed by the first term (<DT>
).
The definition list type can take the COMPACT attribute, which suggests that a compact rendering be used, because the list items are small and/or the entire list is large.
Unless you provide the COMPACT
attribute, the HTML user agent may leave white space between successive <DT>
, <DD>
pairs. The COMPACT
attribute may also reduce the width of the left-hand (<DT>
) column.
<DL COMPACT>
<DT><PRE><DD>Allows for the presentation of preformatted text.
<DT><P><DD>This is used to define paragraph blocks.
</DL>
<DL>
, <DT>
and <DD>
can also take the CLASS, ID and STYLE attributes to allow style sheet definitions to be applied to them. For more details of these attributes, see the Style Sheets topic.