Ordered Lists
|
An ordered list is also a list of items.
The list items are marked with numbers.
An unordered list starts with the <ol> tag.
Each list item starts with the <li> tag.
|
<ol>
<li>list item1</li>
<li>list item2</li>
</ol>
|
|
O/P:
- list item1
- list item2
|
|
Using the start attribute start your ordered list on any number besides 1.
|
<ol start="4" >
<li>list item1</li>
<li>list item2</li>
</ol>
|
|
O/P:
- list item1
- list item2
|
|
There are 4 other types of ordered lists.
You can replace generic numbers with
Roman numberals or letters,both capital and lower-case.
Use the type attribute to change the numbering.
|
<ol type="a">
<li>list item1</li>
<li>list item2</li>
</ol>
|
|
O/P:
- list item1
- list item2
|
|
<ol type="A">
<li>list item1</li>
<li>list item2</li>
</ol>
|
|
O/P:
- list item1
- list item2
|
|
<ol type="i">
<li>list item1</li>
<li>list item2</li>
</ol>
|
|
O/P:
- list item1
- list item2
|
|
<ol type="I">
<li>list item1</li>
<li>list item2</li>
</ol>
|
|
O/P:
- list item1
- list item2
|
|