DL - Definition List

Syntax <DL>...</DL>
Attribute Specifications
Contents One or more or elements
Contained in , , , , , , , , , , , , , , , , , ,

The DL element defines a definition list. An entry in the list is created using the element for the term being defined and the element for the definition of the term.

A definition list can have multiple terms for a given definition as well as multiple definitions for a given term. Authors can also give a term without a corresponding definition, and vice versa, but such a structure rarely makes sense.

An example follows:

<DL>
  <DT>Block-level elements</DT>
  <DD>
    <P>
      In HTML, block-level elements may generally contain
      inline elements and other block-level elements. They are
      usually formatted differently than inline elements,
      typically on a new line in visual browsers.
    </P>
  </DD>
  <DT>Inline elements</DT>
  <DT>Text-level elements</DT>
  <DD>
    <P>
      Inline (or text-level) elements generally only contain
      character data and other inline elements.
    </P>
  </DD>
</DL>

The DL element can be adapted for use with structures that are not strict terms and definitions, a practice that is justified when other HTML elements cannot adequately describe a structure. Some examples follow:

Note the use of the attribute in the preceding examples. This allows the author to easily suggest, through , a distinguishing presentation for different kinds of definition lists.

In addition to the shared by most elements, DL takes a COMPACT attribute. This attribute, in HTML 4.0 and poorly supported among browsers, suggests that visual browsers render the list compactly, perhaps with reduced spacing between items.

More Information