2.2 Lists

LearnPress version: 1.5

Last modified: 27 October 2009

Contents

  1. Definition lists or description lists
  2. Bibliographies and lists of references
    1. Ordinary bibliographies
    2. Annotated bibliographies
  3. Dot leaders

Definition lists or description lists

The dl element, or definition list, is an association list consisting of name-value groups (a description list). Each group must consist of one or more names (dt elements) followed by one or more values (dd elements). Name-value groups may be terms and definitions, metadata topics and values, or any other groups of name-value data. The order of name/value pairs may be significant, but should not be crucial to understanding.

The most common use of the dl element is for lists of terms and definitions. It may also be used for the following, among other cases:

The dl should not be used where ordinary headers and paragraphs would suffice.

Examples of use and markup are provided in the HTML 5 draft specifications.

Bibliographies and lists of references

This information pertains to bibliographies and similar content typed and marked up by hand, not to bibliographies generated by LearnPress.

When compiling a bibliography, list of references, list of “related reading,” etc., use one of the following two styles.

Ordinary bibliographies

If the entries are not annotated, use an unordered list:

<ul class="bibliography">
<li>David Walbert, <cite>Garden Spot: Lancaster County, the Old Order Amish, and the Selling of Rural America</cite>. New York: Oxford University Press, 2002.</li>
</ul>

Entries display like this:

If your bibliography has headings, place a new unordered list after each heading.

Annotated bibliographies

If the entries are annotated, use a definition list:

<dl class="bibliography">
&lt;dt>David Walbert, <cite>Garden Spot: Lancaster County, the Old Order Amish, and the Selling of Rural America</cite>. New York: Oxford University Press, 2002.</dt>
<dd>This is a wonderful book. It is smashingly brilliant.</dd>
</dl>

Entries display like this:

David Walbert, Garden Spot: Lancaster County, the Old Order Amish, and the Selling of Rural America. New York: Oxford University Press, 2002.
This is a wonderful book. It is smashingly brilliant.

If your annotation has multiple paragraphs, you can place <p> elements inside the <dl>:

<dl class="bibliography">
<dt>David Walbert, <cite>Garden Spot: Lancaster County, the Old Order Amish, and the Selling of Rural America</cite>. New York: Oxford University Press, 2002.</dt>
<dd><p>This is a wonderful book. It is smashingly brilliant.</p>
<p>No, really, it is!</p></dd>
</dl>

David Walbert, Garden Spot: Lancaster County, the Old Order Amish, and the Selling of Rural America. New York: Oxford University Press, 2002.

This is a wonderful book. It is smashingly brilliant.

No, really, it is!

As with any definition list, you can have multiple consecutive <dt>s or <dd>s. (See definition lists.) Consecutive <dt>s may be used, for example, when the same annotation pertains to two works by the same author. It is unlikely that you will need to use consecutive <dd>s, which would be two separate annotations, not merely two paragraphs of the same annotation.

Dot leaders

Although CSS 2 supports dot leaders, browsers don’t actually implement them. For cases where a dot leader is visually helpful, use this markup:

<ul class="dotleader">
<li><span class="left">From Sea to Wilmington and to Sea again, per ton</span> <span class="right">50 cents.</span><br /></li>
</ul>

Which will display like this: