HTML:Element:dl
From MDC
[edit] Summary
Definition list element encloses a list of terms and definition pairs. A common use for this element is to implement a glossary.
- Element type: block-level
- Allowed content: dt, dd
[edit] Attributes
- compact Non-standard
- Force definition description to appear at the same line as definition term. Works only in Internet Explorer.
[edit] Examples
[edit] Single term and definition
<dl>
<dt>Firefox</dt>
<dd>A free, open source, cross-platform, graphical web browser
developed by the Mozilla Corporation and hundreds of volunteers.</dd>
<!-- other terms and definitions -->
</dl>
Output:
[edit] Multiple term, single definition
<dl>
<dt>Firefox</dt>
<dt>Mozilla Firefox</dt>
<dt>Fx</dt>
<dd>A free, open source, cross-platform, graphical web browser
developed by the Mozilla Corporation and hundreds of volunteers.</dd>
<!-- other terms and definitions -->
</dl>
Output:
[edit] Single term, multiple definition
<dl>
<dt>Firefox</dt>
<dd>A free, open source, cross-platform, graphical web browser
developed by the Mozilla Corporation and hundreds of volunteers.</dd>
<dd>The Red Panda also known as the Lesser Panda, Wah, Bear Cat or Firefox,
is a mostly herbivorous mammal, slightly larger than a domestic cat
(60 cm long).</dd>
<!-- other terms and definitions -->
</dl>
Output:
[edit] Multiple term and definition
It is also possible to create multiple term and definition, but you already know how to do it.
[edit] Notes
It is not encouraged to use this tag, along with unordered lists, to merely create an indent on a page. Although it works, this is a bad practice and obscures the meaning of definition lists.
To change indent of definition term, use CSS margin property.
[edit] See Also
| HTML Elements |
| A B C D E F G H I J K L M N O P Q R S T U V W X Y Z |
| (Quick Links: HTML Element Cross Reference, HTML Category) |


