Skip to Content
Web Design in a Nutshell, 3rd Edition
book

Web Design in a Nutshell, 3rd Edition

by Jennifer Robbins
February 2006
Intermediate to advanced
826 pages
63h 42m
English
O'Reilly Media, Inc.
Content preview from Web Design in a Nutshell, 3rd Edition

The markup structure for definition lists is a little different from the lists discussed so far. The entire list, made up of dt and dd elements, is contained within the dl element, as shown here.

<dl><dt>em</dt>
        <dd>Indicates emphasized text. em elements are nearly always rendered in italics.</dd>

        <dt>strong</dt>
        <dd>Denotes strongly emphasized text. Strong elements are nearly always
rendered in bold text.</dd>

        <dt>abbr</dt>
        <dd>Indicates an abbreviated form.</dd>

        <dt>acronym</dt>
        <dd>Indicates an acronym.</dd></dl>

Terms and definitions are not required to appear in alternating order. In other words, it is fine to introduce two terms and apply one definition, or supply two or more definition elements for a single term. The HTML 4.01 Recommendation provides an informal example of definition list dialogues, where the speaker corresponds to the term and the spoken words correspond to the definition. Many semantic (X)HTML experts consider this particular example to be an abuse of the semantics of definitional lists and thus it should be avoided.

The presentation of definition lists should be controlled with style sheet properties. By default, user agents generally display the definitions on an indent.

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.
Start your free trial

You might also like

Beginning Responsive Web Design with HTML5 and CSS3

Beginning Responsive Web Design with HTML5 and CSS3

Jonathan Fielding

Publisher Resources

ISBN: 0596009879Errata Page