HTML <ol> Tag
In this tutorial, we will learn about ol tag in HTML with the help of examples.
<ol> Tag
Ol tag <ol> is used to define an ordered list.
An ordered list can be numerical or alphabetical.
Syntax
<ol>.........</ol>
Example
<!DOCTYPE html>
<html>
<head>
<title>Ol Tag</title>
</head>
<body>
<ol>
<li>HTML</li>
<li>CSS</li>
<li>Javascript</li>
</ol>
</body>
</html>
Output
- HTML
- CSS
- Javascript
Specific Attribute
Attribute | Value | Description |
---|---|---|
compact | autofocus | It defines if compact rendering is required |
reversed | reversed | It specifies the order of the list to decending |
start | number | It specifies the initial number to start the list |
list | A a I i 1 |
It specifies the style of the list |
Global Attribute
Ol Tag support all the global attributes of HTML.
Event Attribute
Ol Tag support all the event attributes of HTML.
Next Tutorial
We hope that this tutorial helped you develop better understanding of the concept of <ol> tag in HTML.
Keep Learning : )
In the next tutorial, you'll learn about HTML <optgroup>
Tag.