<ol> for ordered list
The ol element creates an ordered list. The items in the list are denoted using the li element. The ol element has attributes: start, reversed, type.
<!DOCTYPE HTML>
<html>
<head>
<title>Example</title>
</head>
<body>
I like:
<ol>
<li>HTML</li>
<li>CSS</li>
<li>Javascript</li>
<li>SQL</li>
<li>Java</li>
<li>C#</li>
</ol>
</body>
</html>
The start attribute defines the ordinal value of the first item. By default, the first item is assigned the ordinal value of 1. The type attribute indicates which marker should be displayed next to each item.
The following tabls lists the supprted values for the type Attribute of the ol Element:
Value | Description | Example |
---|---|---|
1 | Decimal numbers (default) | 1., 2., 3., 4. |
a | Lowercase Latin characters | a., b., c., d. |
A | Uppercase Latin characters | A., B., C., D. |
i | Lowercase Roman characters | i., ii., iii., iv. |
I | Uppercase Roman characters | I., II., III., IV. |
The following code shows the Lowercase Latin characters
<!DOCTYPE HTML>
<html>
<head>
<title>Example</title>
</head>
<body>
I like:
<ol type='a'>
<li>HTML</li>
<li>CSS</li>
<li>Javascript</li>
<li>SQL</li>
<li>Java</li>
<li>C#</li>
</ol>
</body>
</html>
The following code shows the uppercase roman characters
<!DOCTYPE HTML>
<html>
<head>
<title>Example</title>
</head>
<body>
I like:
<ol type='I'>
<li>HTML</li>
<li>CSS</li>
<li>Javascript</li>
<li>SQL</li>
<li>Java</li>
<li>C#</li>
</ol>
</body>
</html>