List are a way of representing things in a chronological manner.Sometime we use it to show the hierarchy also.
List can be of two types : Ordered List , UnOrdered Listfirst published! (required)
Ordered List in HTML
Cricket Playing nations
- India
- Pakistan
- England
- South Africa
For above list, we have to use the below code
<ol>
<li>India</li>
<li>Pakistan</li>
<li>England</li>
<li>South Africa</li>
</ol>
Another style for ordered list
- India
- Pakistan
- England
- South Africa
For above list, we have to use the below code
<ol type=”I”>
<li>India</li>
<li>Pakistan</li>
<li>England</li>
<li>South Africa</li>
</ol>
<ol type=”1|a|A|i|I”> type attribute values mean
1 Decimal numbers (1, 2, 3, 4),default value for ordered list
a Alphabetically ordered list, lowercase (a, b, c, d)
A Alphabetically ordered list, uppercase (A, B, C, D)
i Roman numbers, lowercase (i, ii, iii, iv)
I Roman numbers, uppercase (I, II, III, IV)
to start the numbering from a specific number use
<ol start=”n”>
the below code has been generated using
<ol start=”8″>
- India
- Pakistan
- England
- South Africa
To reverse the order use <ol reversed> tag