HTML Ordered Lists

An HTML ordered list ( <ol>) is used to display items in a sequential order, such as numbers or letters. It helps to present information where the order of items matters. The default style is numerical, but you can customize it to use other formats such as Roman numerals or letters.

Syntex:

<ol>
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
</ol>

Types of Ordered Lists

  1. Numeric Number (1, 2, 3) (default)

  2.Capital Roman Numerals (I, II, III)

  3.Small Roman Numerals (i, ii, iii)

  4.Capital Alphabet (A, B, C):

  5.Small Alphabet (a, b, c):

Example:

<!DOCTYPE html>
<html>
<head>

<title>Ordered List Examples</title>

</head>
<body>

<h3>Different Types of Ordered Lists</h3>

<h4>Numeric Number</h4>

<ol type="1">
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
</ol>

<h4>Capital Roman Numerals</h4>

<ol type="I">
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
</ol>

<h4>Small Roman Numerals</h4>

<ol type="i">
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
</ol>

<h4>Capital Alphabet</h4>

<ol type="A">
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
</ol>

<h4>Small Alphabet</h4>

<ol type="a">
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
</ol>

</body>
</html>

Output:

Different Types of Ordered Lists

Numeric Number

  1. First item
  2. Second item
  3. Third item

Capital Roman Numerals

  1. First item
  2. Second item
  3. Third item

Small Roman Numerals

  1. First item
  2. Second item
  3. Third item

Capital Alphabet

  1. First item
  2. Second item
  3. Third item

Small Alphabet

  1. First item
  2. Second item
  3. Third item