HTML and CSS Reference
In-Depth Information
Marking Lists
• To mark an ordered list, enter
<ol>
<li>
item1
</li>
<li>
item2
</li>
...
</ol>
where
item1
,
item2
, and so forth are the items in the list.
• To mark an unordered list, enter
<ul>
<li>
item1
</li>
<li>
item2
</li>
...
</ul>
• To mark a description list, enter
<dl>
<dt>
term1
</dt>
<dd>
description1
</dd>
<dt>
term2
</dt>
<dd>
description2a
</dd>
<dd>
description2b
</dd>
...
</dl>
where
term1
,
term2
, etc. are the terms in the list and
description1
,
description2a
,
description2b
, etc. are descriptions associated with the preceding terms.
Ordered Lists
Ordered lists
are used for items that follow some defi ned sequential order, such as lists
ordered from smallest to greatest or from oldest to youngest. The beginning of an ordered
list is marked by the
<ol>
(ordered list) tag. Each item within an ordered list is marked
using the
<li>
(list item) tag. The structure of an ordered list is therefore
<ol>
<li>
item1
</li>
<li>
item2
</li>
...
</ol>
where
item1
,
item2
, and so forth are the items in the list. To explore creating an
ordered list, you'll return to the HTML demo page.
To create an ordered list:
◗
1.
Return to the
demo_html.htm
file in your Web browser.
◗
2.
Delete the HTML code in the left box and replace it with the following:
<ol>
<li>First Item</li>
<li>Second Item</li>
<li>Third Item</li>
</ol>