dl
The HTML <dl> element groups terms or names in <dt> with their descriptions or values in <dd>.
What you will learn
- What relationship a
dldescription list represents - How to pair
dtterms withdddescriptions - When a glossary, FAQ, or specification table is a good fit
Basic structure
<dl>
<dt>HTML</dt>
<dd>A markup language for structuring web documents.</dd>
<dt>CSS</dt>
<dd>A language for styling web documents.</dd>
</dl>
Use dt for the term, name, or question, then place its matching explanation, value, or answer in dd. One term can have several descriptions, and several terms can share one description when that relationship is accurate.
Good use cases
- Glossaries: list a word and its meaning.
- FAQs: use a question as the term and its answer as the description.
- Specifications: pair a property name with its value.
When to use another list
Use ul when the items are an unordered collection, and ol when their order matters. Choose dl when each item has a meaningful term-and-description relationship.