Definition lists
Definition lists allow you to identify a list of words or phrases and their corresponding definitions. A simple definition list formats as a two-column list: the terms you define appear in the left column, and the definitions for the terms appear in the right column. Definition lists are slightly more complex than the previous lists we've discussed, because of the additional tags required to construct them.
- DL
- Begins a definition list. The required end tag ends the list.
- DT
- Identifies the term being defined. The definition term is formatted in the left column of the list. It does not require an end tag.
- DD
- Identifies the term description. Each definition description is formatted in the right column of the list, immediately opposite or below its associated term. It does not require an end tag.
- DTHD
- Defines a header for the definition term column.
- DDHD
- Defines a header for the definition description column.
Both of these tags are optional for creating definition lists. We'll show you how you can use them to enhance definition lists later on in this topic.
Here is an example of a definition list:
Department Codes
Use the following codes for each of the
matching departments:
AP Appliances
AU Automotive
GA Garden shop
HB Health and beauty
HO Home decor
SP Sporting goods
<!doctype dm system>
<panel name=deptcode width=42>Department Codes
<area>
<info width=40>
<p>Use the following codes for each of the
matching departments:
<dl>
<dt>AP
<dd>Appliances
<dt>AU
<dd>Automotive
<dt>GA
<dd>Garden shop
<dt>HB
<dd>Health and beauty
<dt>HO
<dd>Home decor
<dt>SP
<dd>Sporting goods
</dl>
</info>
</area>
</panel>A definition list can contain multiple definition terms. The TSIZE attribute of the enclosing DL tag specifies the number of DT tags in a group and their respective widths. For example, TSIZE='10 5' specifies 2 definition term columns with sizes of 10 and 5 characters, respectively.
- TSIZE
- specifies the space allocated for the term column or columns
- BREAK
- indicates if the definition formats on the same line as its associated term
- COMPACT
- determines if there is a space between each set of terms and descriptions
- NOSKIP
- suppresses the blank line normally placed before the list
- INDENT
- controls the indentation from the current left margin
- FORMAT
- controls the location of the definition term within the TSIZE space
- DIVEND
- determines whether a divider character is inserted following the DDHD and DD tag text
- SPLIT
- controls the format of the last DT tag in a multiple DT tag group
Use the TSIZE attribute to specify how much space you want for the definition term column (or columns). The default value is 10 bytes, which also sets the default number of DT tags to one. If you want to specify more (or less) space than the default, or multiple DT tags, use the TSIZE attribute to assign the value you want.
- NONE
- The definition descriptions start on the same lines as the definition terms.
- ALL
- All of the definition descriptions start on the line after the definition terms.
- FIT
- The definition descriptions are to start on the next line only when the definition term does not fit in the allocated space and spills over into the description area.
<!doctype dm system>
<panel name=reverb1 width=52>Reverberations
<area>
<info width=50>
<p>Reverberations is one of the most popular brands of electronic
components available today.
We stock the following Reverberations components:
<dl break=all>
<dt>CD Player Unit
<dd>With auto-search, auto-off, power door, and
a two-year warranty.
<dt>Receiver
<dd>Digital, 6-speaker hookup, and built-in
equalizer.
<dt>Tape deck
<dd>Supports metal and chrome cassettes, and comes with
a two-year warranty.
</dl>
</info>
</area>
</panel>Figure 2 shows how this definition list formats.
Reverberations
Reverberations is one of the most popular brands
of electronic components available today. We
stock the following Reverberations components:
CD Player Unit
With auto-search, auto-off, power door,
and a two-year warranty.
Receiver
Digital, 6-speaker hookup, and built-in
equalizer.
Tape deck
Supports metal and chrome cassettes, and
comes with a two-year warranty.
<!doctype dm system>
<panel name=reverb2 width=52>Reverberations
<area>
<info width=50>
<p>Reverberations is one of the most popular brands of electronic
components available today.
We stock the following Reverberations components:
<dl tsize=13 break=fit>
<dthd>Component
<ddhd>Features
<dt>CD Player Unit
<dd>With auto-search, auto-off, power door, and
a two-year warranty.
<dt>Receiver
<dd>Digital, 6-speaker hookup, and built-in equalizer.
<dt>Tape deck
<dd>Supports metal and chrome cassettes, and comes with
a two-year warranty.
</dl>
</info>
</area>
</panel>Here is how the panel looks now:
Reverberations
Reverberations is one of the most popular brands
of electronic components available today. We
stock the following Reverberations components:
Component Feature
CD Player Unit
With auto-search, auto-off, power
door, and a two-year warranty.
Receiver Digital, 6-speaker hookup, and
built-in equalizer.
Tape deck Supports metal and chrome cassettes,
and comes with a two-year warranty.