<dl> (short for definition list) tag specifies a definition list. It is a list of terms with their associated definitions. A common use for this element is to implement a glossary.
Definition lists vary only slightly from other types of lists in that list items consist of two parts: a term and a description.
- The term is given by the
<dt>element and can only contains inline-level elements.
- The description is given with a
<dd>element that can contains block-level elements.
The following table summarizes the usages context and the version history of this tag.
|Start/End Tag:||Start tag: required, End tag: required|
|Version:||HTML 2, 3.2, 4, 4.01, 5|
The basic syntax of the
<dl> tag is given with:
The example below shows the
<dl> tag in action.
ExampleTry this code »
<dl> <dt>term1</dt> <dd>– definition1</dd> <dt>term2</dt> <dd>– definition2</dd> </dl>
<dl> tag doesn't have any specific attribute.
Like all other HTML tags, the
<dl> tag supports the global attributes in HTML5.
<dl> tag also supports the event attributes in HTML5.
<dl> tag is supported in all major modern browsers.
See tutorial on: HTML Lists.