HTML and CSS Reference
In-Depth Information
Ordered Lists
The ordered list element,
<ol>
, works very much like the unordered list element; individu-
al list items are created in the same manner (see
Figure 8.2
)
. The main difference between
an ordered list and an unordered list is that with an ordered list, the order in which items
are presented is important.
Figure 8.2
An ordered list with three list items whose order does matter
Because the order matters, instead of using a dot as the default list item marker, an ordered
list uses numbers.
1.
<ol>
2.
<li>Head north on N Halsted St</li>
3.
<li>Turn right on W Diversey Pkwy</li>
4.
<li>Turn left on N Orchard St</li>
5.
</ol>
Ordered lists also have unique attributes available to them including
start
and
re-
versed
.
Start Attribute
should start at
30
or another number. When we use the
start
attribute on the
<ol>
ele-
ment, we can identify exactly which number an ordered list should begin counting from.
Figure 8.3
An ordered list with three list items and a
start
attribute value of
30
The
start
attribute accepts only integer values, even though ordered lists may use differ-
ent numbering systems, such as roman numerals.
Search WWH ::
Custom Search