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:
dtelements are not unlike paragraphs without margins.ddelements are offset withmargin-left, but never take a marker.ddelements have the same (lack of) constraints on valid contents aslielements.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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access