The ol tag
The ol tag creates a so-called ordered list with markers in the form of numbers.
The ol tag should be used together with the li tag, which creates list items (and ol creates the list itself, see example below). Without the li tag, the ol tag is not used.
The advantage of the ol tag is that it automatically places the numbering. If you want to insert a couple of items in the middle of the list, the numbering will adjust to you.
You can change or completely remove list markers using the CSS property list-style-type.
Example . List ol
Let's see what the ol list looks like in the browser by default:
<ol>
<li>list item</li>
<li>list item</li>
<li>list item</li>
<li>list item</li>
<li>list item</li>
</ol>
:
See also
-
tag
ul,
which creates an unordered list -
property
counter-increment,
which allows you to number the elements