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

  1. First Item
  2. Second Item
  3. 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

  1. First Item
  2. Second Item
  3. Third Item
  1. First Item
  2. Second Item
  3. 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

  1. First Item
  2. Second Item
  3. Third Item
  1. First Item
  2. Second Item
  3. Third Item

Start Attribute

Start Attribute used Skip old Number and allow new starting Number.

  1. Seven Item
  2. Eight Item
  3. 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 53 times, 1 visits today)
Share with Friends :
Written by:

Leave a Reply

Your email address will not be published. Required fields are marked *