Language References
Denotes a definition list. | HTML 2, 3.2, 4, 4.01, 5 |
HTML Syntax
<dl
class = classname
compact
id = value
style = css properties
title = text
event = script
>
A definition list contains terms to be defined, which are specified with the DT element, and definitions, which are specified with the DD element. By default, browsers align terms on the left and indents each definition on a new line. However, the compact attribute can be used to display a definition on the same line as the preceding term, if it fits on one line.
The DL element is typically used to display a list of terms and their corresponding definitions, such as in a glossary.
This element is a block element.
DL Members
The following shows how the DL element may be used.
<dl>
<dt>W3C
<dd>World Wide Web Consortium
<dt>HTML
<dd>HyperText Markup Language
<dt>CSS
<dd>Cascading Style Sheets
</dl>
which would render on a Web page as
- W3C
- World Wide Web Consortium
- HTML
- HyperText Markup Language
- CSS
- Cascading Style Sheets
DD DT Using Lists in HTML