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.

Basic Example

app/page.tsx
1<ol>
2  <li>Mango</li>
3  <li>Orange</li>
4  <li>Litchi</li>
5</ol>

Output

app/page.tsx
11.Mango
22.Orange
33.Litchi

Setting the 'type' Attribute

The type attribute specifies the style of numbering. You have several options:

  • Uppercase Roman Numerals: Use type="I"
  • Lowercase Roman Numerals: Use type="i"
  • Arabic Numerals: Use type="1" (This is the default if the type attribute is not specified)
  • Lowercase Alphabetical Letters: Use type="a"
  • Uppercase Alphabetical Letters: Use type="A"

Setting the 'start' Attribute

The start attribute specifies the starting number for the list.

app/index.html
1<ol type="A" start="3">
2  <li>Pen</li>
3  <li>Pencil</li>
4</ol>

Output

app/page.tsx
13.Pen
24.Pencil