Creating Definition Lists


(X)HTML provides a special tag for creating definition lists. This type of list is particularly suited to glossaries, but works well with any list that pairs a word or phrase with a longer description. Imagine, for example, a list of Classical Greek verb tenses, each followed by an explanation of proper usage.

To create definition lists:

1.

Type the introductory text for the definition list.

2.

Type <dl>.

3.

Type <dt>.

4.

Type the word or short phrase that will be defined or explained, including any logical or physical formatting desired.

5.

Type </dt> to complete the definition term.

6.

Type <dd>.

7.

Type the definition of the term that was entered in step 4.

8.

Type </dd> to complete the definition.

9.

Repeat steps 38 for each pair of terms and definitions.

10.

Type </dl> to complete the list of definitions.

Tips

  • Browsers generally indent definitions on a new line below the definition term.

  • You can create more than one dl line or more than one dt line to accommodate multiple words or multiple definitions.


Figure 15.19. Each entry word is labeled with the dt tag, while the definition itself is labeled with a dd tag.


Figure 15.20. You may want to add formatting to your definition term to help it stand out.


Figure 15.21. By default, the defined word (the dt) is aligned to the left and the definition (dd) is indented.





HTML, XHTML, & CSS(c) Visual QuickStart Guide
HTML, XHTML, and CSS, Sixth Edition
ISBN: 0321430840
EAN: 2147483647
Year: 2004
Pages: 340

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net