dd
The HTML <dd> element provides a description, definition, or value for a term in a <dl> description list.
What you will learn
- What description or additional information
ddrepresents - How it pairs with
dlanddt - How to use description lists for glossaries and FAQs
Basic glossary example
<dl>
<dt>HTML</dt>
<dd>The language used to structure web documents.</dd>
<dt>CSS</dt>
<dd>The language used to style and lay out documents.</dd>
</dl>
dt names the term and dd supplies its description. Keep the relationship clear so the list can be read as term-and-explanation pairs.
One term can have multiple descriptions
<dl>
<dt>Cache</dt>
<dd>A stored copy used to speed up a response.</dd>
<dd>A common source of stale content during development.</dd>
</dl>
A term may have more than one dd when the descriptions are separate but belong to the same term. A description can also contain paragraphs, links, or other flow content.
FAQ pattern
<dl>
<dt>How do I reset my password?</dt>
<dd>Select “Reset password” on the sign-in page.</dd>
</dl>
Questions and answers can form a description list when the markup clearly represents pairs. For a long interactive disclosure, consider whether a heading and paragraphs or a details component would be clearer.
Common mistakes
- Using
ddas an arbitrary indentation or layout element. - Putting a description outside a
dl. - Using a description list for ordinary navigation or a table of unrelated data.
- Relying on default indentation instead of choosing CSS for presentation.