HTML Basics
Stanford University Libraries & Academic Information Resources

Definition lists

 [Previous Page]  [Tutorial Top]  [Tech Guide]  [Next Page]

The <dl> tag marks a Definition list, which differs from all the other forms of lists in that it is not a sequence of List items. Intended originally for use in glossaries and similar texts, a Definition list is a sequence of paired terms and definitions. The terms are marked with the <dt> tag (for "Definition list term"), and the definitions are marked with the <dd> tag (for "Definition list definition").

More generally, <dl>, is used to present a list of items along with descriptive paragraphs. This can be used for glossaries, but is also useful for presenting other paired lists of terms (or phrases), and discursive material about those terms. (In some other markup systems, this sort of list is called a discursive list, rather than definition list

It is perfectly legal to have more than one <dt> and more than one <dt> in each term/definition pair, though you should pay careful attention to the meaning of such structures.[1]

In it's simplest form, it is used as in the following example. Note that the specification gives no indication that the <dt> should receive any special rendering, and it has become a common idiom to apply one of the highlighting tags to the term.[2]

Example

    <dl>

    <dt><b>Canon.</b></dt>
    <dd>An accepted principle or rule; a criterion or
    standard of judgement; a body of principles, rules, standards, or
    norms.</dd>

    <dt><b>Code.</b></dt>
    <dd>A systematic statement of a body of law esp. one
    given statutory force; a system of principles or rules.</dd>

    <dt><b>Commentary.</b></dt>
    <dd>A systematic series of explanations or interpretations of a
    writing.<p> Provided for some of the Rules of Conduct, a commentary is
    meant to clarify or elaborate the intent of the rule. The commentary is
    not part of the Code but is provided for assistance to those seeking to
    conform their conduct to the Code and those charged with its
    enforcement.</dd>

    <dt><b>Ethic.</b></dt>
    <dd>a) A set of moral principles or values; b) a
    theory or system of moral values; c) pl but sing or pl in constr:
    the principles or conduct governing an individual or a group.</dd>

    </dl>

which is rendered

Canon.
An accepted principle or rule; a criterion or standard of judgement; a body of principles, rules, standards, or norms.
Code.
A systematic statement of a body of law esp. one given statutory force; a system of principles or rules.
Commentary.
A systematic series of explanations or interpretations of a writing.
Provided for some of the Rules of Conduct, a commentary is meant to clarify or elaborate the intent of the rule. The commentary is not part of the Code but is provided for assistance to those seeking to conform their conduct to the Code and those charged with its enforcement.
Ethic.
a) A set of moral principles or values; b) a theory or system of moral values; c) pl but sing or pl in constr: the principles or conduct governing an individual or a group.

Notice the two <dd> elements under Commentary above. It is also possible to include sequences of paragraphs, blockquotes, and other forms of list in either <dt> or <dd> elements, so a Definition List can support quite complex document structures.

Note that the end-tags on <dt> and <dd> may be omitted (and usually are, as it is usually clear where one element leaves off and the next begins). In the case of complex lists with nested Definition lists, however, including the end-tags can help clarify the structure of the text and prevent hard-to-find errors.

 [Previous Page]  [Tutorial Top]  [Tech Guide]  [Next Page]


Walter Henry
Stanford University Libraries and Academic Information Resources