HTML Ordered List
An ordered list is a list of items that are arranged in a specific, sequential order. Each item in the list is usually numbered to indicate its position in the sequence. Ordered lists are commonly used when the sequence of the items is important, such as in step-by-step instructions or rankings.
Syntax:
<ol>
<li>Mango</li>
<li>Orange</li>
<li>Litchi</li>
</ol>
Output:
- Mango
- Orange
- Litchi
Setting the 'type' Attribute:
The type attribute specifies the style of numbering. You have several options:
- Pen
- Pencil
Output:
- Pen
- Pencil
Setting the 'start' Attribute:
The start attribute specifies the starting number for the list.
<ol type="A" start="3">
<li>Pen</li>
<li>Pencil</li>
</ol>
Output:
- Pen
- Pencil