HTML and CSS Reference
In addition to ordered and unordered lists, there is a third kind of list, called a
definition list , which offsets information in a dictionary-like style. Although they are used
less often than unordered or ordered lists, definition lists are useful to create a glossary-like
list of terms and definitions, as shown in Figure 2-15a. Figure 2-15b shows the HTML
code used to create the definition list.
(a) Example of
definition terms enclosed
in <dt> </dt> tags
in <dd> </dd> tags
(b) HTML code used to create a definition list.
The syntax for definition lists is not as straightforward as the <ul>, <ol>, or <li>
structure that is used in the unordered and ordered list styles. With definition lists, you
use the <dl> and </dl> tags to start and end the list. A <dt> tag indicates a term, and a
<dd> tag identifies the definition of that term by offsetting the definition from the term.
Table 2- 6 lists definition list tags and their purposes.
Table 2-6 Definition List Tags and Purposes
Definition List Tags
Start and end a definition list
Identify a term
Identify the definition of the term directly above
As shown in Figure 2-15, by default, the definition term is left-aligned on the line
and the definition for each term is indented so it is easily distinguishable as the definition
for the term above it. In order to more clearly identify the definition term, you may want
to make the term bold, as shown in the last two definitions (HTTP and Web Server)
in Figure 2-15. You could do this by wrapping the term inside a <strong></strong>