Web Design / HTML

  1. Home
  2. Computing & Technology
  3. Web Design / HTML

<dl></dl>

By Jennifer Kyrnin, About.com

<dl> Description:

The <dl> element defines definition lists.

<dl> Web Browser Support:

<dl> Attributes:

<dl> End Tag:

</dl> REQUIRED

Contents:

List elements. The following tags are valid within the <dl> tag:
dd, dt

<dl> Valid Context:

The <dl> tag is valid within the following tags:
body

<dl> Usage:

  • standard list
    <dl>
    <dt>term</dt>
    <dd>definition</dd>
    <dt>term</dt>
    <dd>definition</dd>
    </dl>
  • compact list
    <dl compact="compact"> <dt>term</dt> <dd>definition</dd> <dt>term</dt> <dd>definition</dd>
    </dl>

<dl> Special Notes:

  • The compact attribute displays differently on different browsers. Always check the look before using it.
  • While some editors use the dl tags to indent text, this is not a syntactically correct use of HTML. Use style sheets instead.
  • Definition lists are most commonly used in glossary's and indexes, but can be used anywhere that a short section of text is followed by a longer segment.
  • The dl list is an easy way to create custom bullets. Simply place an icon image after the dt tag.

More <dl> Information:

Return to XHTML Element (HTML Tags) Library

Explore Web Design / HTML

About.com Special Features

Web Design / HTML

  1. Home
  2. Computing & Technology
  3. Web Design / HTML

©2009 About.com, a part of The New York Times Company.

All rights reserved.