Ordered Lists in HTML

<OL>
<LI>First Item</LI>
<LI>Second Item</LI>
<LI>Third Item</LI>
</OL>

<OL>
Ordered List List , One pair of tag is allowed.
<LI>
Items of Ordered List, Mulitple pairs allowed. Child of <OL>
Ordered lists are also referred to as Numbered Lists.

Ordered lists can be defined using <OL> ... </OL> tags. The tag <OL> indicates the start of a ordered(numbered) list while </OL> signals the end of the list.

Attributes of <OL> .. </OL> :

Type: This attribute indicates the type of the numbering /listing to be used.
TypeDescription
Type = 1 Numbered List . 1,2,3 ... Default.
Type = a Lowercase alphabets a, b, c ....
Type = A Uppercase alphabets A,B,C ....
Type = I Uppercase roman numbers I,II, III,IV ....
Type = i Lowercase roman numbers i,ii,iii,iv ....

Type = 1


  1. First Item
  2. Second Item
  3. Third Item
  4. Fourth Item
  5. Fifth Item
<OL type=1>
<LI>First Item</LI>
<LI>Second Item</LI>
<LI>Third Item</LI>
<LI>Fourth Item</LI>
<LI>Fifth Item</LI>
</OL>

Type = a


  1. First Item
  2. Second Item
  3. Third Item
  4. Fourth Item
  5. Fifth Item
<OL type=a>
<LI>First Item</LI>
<LI>Second Item</LI>
<LI>Third Item</LI>
<LI>Fourth Item</LI>
<LI>Fifth Item</LI>
</OL>

Type = A


  1. First Item
  2. Second Item
  3. Third Item
  4. Fourth Item
  5. Fifth Item
<OL type=A>
<LI>First Item</LI>
<LI>Second Item</LI>
<LI>Third Item</LI>
<LI>Fourth Item</LI>
<LI>Fifth Item</LI>
</OL>

Type = I


  1. First Item
  2. Second Item
  3. Third Item
  4. Fourth Item
  5. Fifth Item
<OL type=I>
<LI>First Item</LI>
<LI>Second Item</LI>
<LI>Third Item</LI>
<LI>Fourth Item</LI>
<LI>Fifth Item</LI>
</OL>

Type = i


  1. First Item
  2. Second Item
  3. Third Item
  4. Fourth Item
  5. Fifth Item
<OL type=i>
<LI>First Item</LI>
<LI>Second Item</LI>
<LI>Third Item</LI>
<LI>Fourth Item</LI>
<LI>Fifth Item</LI>
</OL>

Using style

We can use list-style-type: to add different types of numbering to list including various languages. Here are some examples , you can try more. Adding Leading zero to decimal numbers.

  1. First Item
  2. Second Item
  3. Third Item
  4. Fourth Item
  5. Fifth Item
<OL style='list-style-type:decimal-leading-zero'>
<LI>First Item</LI>
<LI>Second Item</LI>
<LI>Third Item</LI>
<LI>Fourth Item</LI>
<LI>Fifth Item</LI>
</OL>

style='list-style-type:lower-greek'


  1. First Item
  2. Second Item
  3. Third Item
  4. Fourth Item
  5. Fifth Item
<OL style='list-style-type:lower-greek'>
<LI>First Item</LI>
<LI>Second Item</LI>
<LI>Third Item</LI>
<LI>Fourth Item</LI>
<LI>Fifth Item</LI>
</OL>

style='list-style-type:armenian'


  1. First Item
  2. Second Item
  3. Third Item
  4. Fourth Item
  5. Fifth Item
<OL style='list-style-type:armenian'>
<LI>First Item</LI>
<LI>Second Item</LI>
<LI>Third Item</LI>
<LI>Fourth Item</LI>
<LI>Fifth Item</LI>
</OL>

style='list-style-type:oriya'


  1. First Item
  2. Second Item
  3. Third Item
  4. Fourth Item
  5. Fifth Item
<OL style='list-style-type:oriya'>
<LI>First Item</LI>
<LI>Second Item</LI>
<LI>Third Item</LI>
<LI>Fourth Item</LI>
<LI>Fifth Item</LI>
</OL>

Subscribe to our mailing list

* indicates required
Subscribe to plus2net
Your Rating


Google+

         Lists In HTML  | Ordered Lists  | UnOrdered Lists  | Definition Lists
Ndungu Thairu Wairubi

25-07-2015

very well elaborated article,easy to understand thank you guys.....

Post Comment This is for short comments only. Use the forum for more discussions.




Subscribe to our mailing list

* indicates required
Subscribe to plus2net
HTML . MySQL. PHP. JavaScript. ASP. Photoshop. Articles. FORUM Contact us
©2000-2017 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer