Home > Abakada: Back to Basics > Language References > HTML Elements > DL Element
Denotes a definition list. | HTML 2, 3.2, 4, 4.01, 5 |
HTML Syntax
<dl
class = classname
compact
id = value
style = css_style_rules
title = text
>
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.
NOTE: Both start and end tags are required.
The <dl>
element has no attribute of its own, but supports global attributes common to all HTML elements.
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