Description Lists

Description lists (dl) are block-level containers, much like ordered lists (ol) and unordered lists (ul), and are used for presenting and defining terms.

Description lists (dl) contain sets of description terms (dt) along with corresponding description definitions (dd). Each description term has at least one description definition (dd) associated with it.

According to HTML5 Doctor, definition lists are often used for glossaries and for metadata. If the definition list is being used as a glossary, then a definition term needs to be specified as being a definition (dfn).

Definition List Used as a Glossary

dl
description list: a block-level container similar to ol and ul
dt
description term: tags that enclose a term that is about to be described
dfn
definition: tags that enclose a term about to be not just described, but defined
dd
description definition tags that enclose a definition or description. Note that more than one description definition can be assigned to a description term, such as when a word has multiple meanings (such as pirate). And, conversely, a description definition can have more than one description term associated with it, such as when the same word has alternate spellings.
pirate
A person who uses ships or boats to steal cargo or treasure from other ships.
The act of engaging in copyright infringement.
HTML Syntax
<dl>
<dt><dfn>dl</dfn></dt>
<dd><em>description list</em>: a block-level container similar to <em>ol</em> and <em>ul</em></dd>
<dt><dfn>dt</dfn></dt>
<dd><em>description term</em>: tags that enclose a term that is about to be described</dd>
<dt><dfn>dfn</dfn></dt>
<dd><em>definition</em>: tags that enclose a term about to be not just described, but defined</dd>
<dt><dfn>dd</dfn></dt>
<dd><em>description definition</em> tags that enclose a definition or description. Note that more than one <em>description definition</em> can be assigned to a <em>description term</em>, for example when a word has multiple meanings (such as <em>pirate</em>). And conversely, a <em>description definition</em> can have more than one <em>description term</em> associated with it, for example when the same word has alternate spellings.</dd>
<dt><dfn>pirate</dfn></dt>
<dd>A person who uses ships or boats to steal cargo or treasure from other ships.</dd>
<dd>The act of engaging in copyright infringement.</dd>
</dl>

Definition List Used for Metadata

This is a definition list used to markup some metadata associated with one of my favorite albums.

Album
Fresh
Artist
Sly and the Family Stone
Year
Recorded: 1972-1973
Released: 1973
Genre(s)
Pop
R&B
Funk
Length
39:18
Album Cover
HTML Syntax
<dl>
<dt>Album</dt>
<dd>Fresh</dd>
<dt>Artist</dt>
<dd>Sly and the Family Stone</dd>
<dt>Year</dt>
<dd>Recorded: 1972-1973</dd>
<dd>Released: 1973</dd>
<dt>Genre(s)</dt>
<dd>Pop</dd>
<dd>R&B</dd>
<dd>Funk</dd>
<dt>Length</dt>
<dd>39:18</dd>
<dt>Album Cover</dt>
<dd><img src="https://upload.wikimedia.org/wikipedia/en/7/73/Slyfamstone-fresh.jpg" width="300" height="300" alt="" class="alignnone size-full" /></dd>
</dl>

Leave a Reply

Your email address will not be published. Required fields are marked *