HTML and CSS Reference
In-Depth Information
2. Click the Preview Code button. Figure 1-27 shows the appearance of the descrip-
tion list in the browser.
Figure 1-27
Viewing a description list
Description lists can also
mark dialog, with each
dt element naming a
speaker, and each dd
element containing the
speaker's words.
code for a description list
by default, br o wsers indent the
description as s ociated with each term
The demo page shows each term followed by its description, which is placed in a new
block below the term and indented on the page. If you had included multiple dd ele-
ments for a single dt element, each description would have been contained within its
own block and indented.
Now that you've experimented with the three types of HTML lists, you'll add an unor-
dered list of products to Dave's Web page. By default, the product names will appear as
a bulleted list.
To add an unordered list to Dave's Web page:
1. Return to the jprop.htm file in your text editor.
2. Within the Specials This Month article, directly below the p element, insert the fol-
lowing code, as shown in Figure 1-28:
<ul>
<li>Basic Stick ($19.95)
The easiest stick to learn with, but “grippy” enough
for the most demanding tricks. Comes in red, green,
and blue.
</li>
<li>Flower Stick ($24.95)
A graceful stick with colored tassels. Flower Sticks
fl oat slowly, making them ideal for beginners.
</li>
<li>Master Stick ($39.95)
Our most popular stick is shorter and heavier for
fast play and more advanced tricks. Each Master Stick
is available in custom colors.
</li>
<li>Glow Stick ($29.95)
The Glow Stick shines brightly at night (without
the danger of a fire stick).
</li>
</ul>
Search WWH ::




Custom Search