HTML » Tags » dl

Version: 2.0, 3.2, 4.0

Compability: Explorer 4, 5  Netscape 4, 6

Syntax:
<dl> ... </dl>

The <dl> tag delimits the start and stop of a definition list. This is a type of list where a term or phrase is followed by a definition or explanation.

This dl tag must be used with the dt tag which presents the term and the dd tag which presents the definition.
 
The exact appearance of a definition list can be browser dependent. Most browsers place the term on the left margin and then the definition is placed on the next line and the entire text is indented. However, if the term is short (three characters or less) the definition may start on the same line as the term. Also, the list is usually separated from any preceding and following text by paragraph breaks.
 
You can use the ol to create an ordered list and the ul tag to create an unordered list.
 
The closing tag is mandatory.
 

Examples

Code:
Definition Lists:
<dl>
<dt>dl tag
<dd>definition list start and stop delimiter.
<dt>dt tag
<dd>presents the term or phrase to be defined.
<dt>dd tag
<dd>presents the definition for the term or phrase.
</dl>
Output:
Definition Lists:
dl tag
definition list start and stop delimiter.
dt tag
presents the term or phrase to be defined.
dd tag
presents the definition for the term or phrase.
Explanation:

The preceding example shows the use of the <dl> tag to produce a definition list.

Language(s): HTML

See Also: