HTML and CSS Reference
In-Depth Information
TABLE 5.1
Ordered List Numbering Styles
Attribute
CSS Value
Value
Description
Standard Arabic numerals ( 1 , 2 , 3 , 4 , and so on)
decimal
1
Lowercase letters ( a , b , c , d , and so on)
lower-alpha
a
Uppercase letters ( A , B , C , D , and so on)
upper-alpha
A
Lowercase Roman numerals ( i , ii , iii , iv , and so on)
lower-roman
i
Uppercase Roman numerals (that is, I , II , III , IV ,
and so on)
upper-roman
I
You can specify types of numbering in the <ol> tag as follows: <ol type=“a”> or using
the style attribute, like this:
<ol style=”list-style-type: lower-alpha”>
By default, the decimal type is assumed.
NOTE
HTML5 has dropped support for the type property, and all but the
oldest browsers support list-style-type , so you should take
that approach. However, you may run into old Web pages or tools
for creating Web pages that still use the type attribute .
As an example, consider the following list:
<p> The Days of the Week in French: </p>
<ol>
<li> Lundi </li>
<li> Mardi </li>
<li> Mercredi </li>
<li> Jeudi </li>
<li> Vendredi </li>
<li> Samedi </li>
<li> Dimanche </li>
</ol>
5
If you were to set the list style type upper-roman to the <ol> tag, as follows, it would
appear in a browser, as shown in Figure 5.2:
 
 
Search WWH ::




Custom Search