Definition Lists
Where ordered and unordered lists are simple heaps of data with members that share a
vague classification, definition lists imply definite
relationships between their terms (indicated by dt
elements) and their definitions (indicated by
dd
elements). Each term is followed by
one or more definitions, which are understood to relate strictly to the
term.
To be valid, a definition list must contain at least one dt
or dd
element; to be semantically useful, it must contain at least one of each.
dt
elements may only contain text and
inline elements, while dd
elements can
contain the same broad range of content as li
elements. There is no restriction on the
number or arrangement of dd
and
dt
elements within a given definition
list; it’s left to content authors to ensure that definition list elements
are arranged sensibly.
Styling Definition Lists
The user agent styles applied to definition lists are minimal, and can be described as follows:
dt
elements are not unlike paragraphs without margins.dd
elements are offset withmargin-left
, but never take a marker.dd
elements have the same (lack of) constraints on valid contents asli
elements.Definition list text content is set in unstyled type by default.
The most common uses for a definition list are lexica (e.g., glossaries, dictionaries) and transcribed dialogue. The first of these is fairly straightforward, and the user agent styles will usually be adequate to that purpose, with the caveat that a particularly typography-conscious ...
Get HTML & CSS: The Good Parts now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.