Definition Lists


If you need it, HTML has one more type of list available to you: the definition list, which uses the <dl> tag. Rather than using the usual <li> tag to specify the items in the list, this type of list uses the <dt> tag (for definition terms) and the <dd> tag for their definitions. Following is an example of the HTML for a definition list, and Figure 6.3 shows how the Web browser formats a definition list.

<dl><dt>The Definition Term</dt> <dd>Is defined below the term.</dd></dl>


Figure 6.3. A definition list displayed in the browser.


Table 6.2 lists the HTML tags that were discussed in this lesson.

Table 6.2. HTML Tags Used in This Lesson

HTML Tag

Closing

Description of Use

<dl>

</dl>

Definition list.

<li>

</li>

List item. Used with <ol> and <ul> tags.

<dt>

</dt>

Definition term. The list item of a <dl>.

<dd>

</dd>

Definition data. Describes definition terms.

<ol>

</ol>

Ordered, or numbered/lettered, list.

<ul>

</ul>

Unordered, or bulleted, list.


In this lesson, you've learned:

  • HTML recognizes three different list types: unordered (bulleted), ordered (numbered), and definition.

  • Rather than the default bullet style (a solid circle), style sheets enable you to select three other bullet types: a square, a hollow circle, or an image of your own.

  • The value attribute of the <ol> tag sets the beginning number for your list.



Sams Teach Yourself HTML in 10 Minutes
Sams Teach Yourself HTML in 10 Minutes (4th Edition)
ISBN: 067232878X
EAN: 2147483647
Year: 2004
Pages: 151
Authors: Deidre Hayes

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