The Ordered List element
<ol> element represents an ordered list of items. Its Automatically Assign Numbers or Alphabet’s to a list.
1,2,3,4 Numeric
a,b,c,d and A,B,C,D Alphabet
i,ii,iii and I,II,III Roman
- type=”a” for lower case letters.
- type=”A” for upper case letters.
- type=”i” for Roman lower case numbers.
- type=”I” for Roman upper case numbers.
Numeral Type or Simple Type
<ol> <li>First Item</li> <li>Second Item</li> <li>Third Item</li> </ol>
Result
- First Item
- Second Item
- Third Item
Alphabet Type
<ol type="a"> <li>First Item</li> <li>Second Item</li> <li>Third Item</li> </ol> <ol type="A"> <li>First Item</li> <li>Second Item</li> <li>Third Item</li> </ol>
Result
- First Item
- Second Item
- Third Item
- First Item
- Second Item
- Third Item
Roman Numeral Type
<ol type="i"> <li>First Item</li> <li>Second Item</li> <li>Third Item</li> </ol> <ol type="I"> <li>First Item</li> <li>Second Item</li> <li>Third Item</li> </ol>
Result
- First Item
- Second Item
- Third Item
- First Item
- Second Item
- Third Item
Start Attribute
Start Attribute used Skip old Number and allow new starting Number.
- Seven Item
- Eight Item
- Nine Item
Another Way by Using Style
<ol style=”list-style :upper-alpha”>
- upper-alpha (A, B, C, D, E, etc.)
- lower-alpha (a, b, c, d, e, etc.)
- upper-roman (I, II, III, IV, V, etc.)
- lower-roman (i, ii, iii, iv, v, etc.)
(Visited 60 times, 1 visits today)
Written by: