HTML Cookbook Basic HTML Course

It's Easy!

Alternate version

Lists, Part 2

In Part 1, we discussed ordered and unordered lists.

Definition List

The definition list makes a list of terms and their definitions, like dictionary entries. It uses tags that are quite different from the ordered and unordered lists.

Open a definition list with
<dl>Optional Title.

Close the list with
</dl>
at the end.

List a definition term in the form:
<dt>Term</dt>

Give each term a definition with:
<dd>Definition</dd>.

<dd> stands fordefinition data. You may list more than one definition for each term. You may list separate definitions for the same term wth separate <dd>...</dd> tags or you may list them in one <dd>...</dd> tag separated by <br /> tags or paragraphs.

Example
<dl>Title
<dt>Word 1</dt>
<dd>Definition 1</dd>
<dd>Definition 2</dd>
<dt>Word 2</dt>
<dd>
Definition 1<br />
Definition 2
</dd>
</dl>

appears as:

Title
Word 1
Definition 1
Definition 2
Word 2
Definition 1
Definition 2

Happy coding!
Gnubee

Links
Tips
Tools
References
Rules
HTML Help Gnubee - Newsgroup
HTML Course Contents (Home)

Valid XHTML 1.0!

Valid CSS!