HTML ol tag

ol stands for ordered list. HTML <ol> tag defines ordered list in which the order of list items is necessary. In an ordered list, list items are numbered numerically or alphabetically.

Example

<p>Procedure to make a recipie(with order)</p>
 <ol>
  <li>place all ingredients except the kitchen in the crock pot.
  <li>stir until mixed.
  <li>add the chicken and coat well with the sauce.
  <li>cover and cook on higher for 2-3 hours or on low for 7-8 hours.
 </ol>

Try </>

Specific Uses

Lists where the order is also under consideration. For example, a sequence of instructions.

Related tags

TagsDescription
<li> represents list item as a part of the ordered list.
<ol> <li>.....</li> </ol>

Global Attributes

All the global attributes are applicable on the ol tag.

Tag omission

Both opening and closing tags are necessary for the ol element.

Specific Attributes

<ol> tag attributes

TagsDescription
reversed the reveresed attribute represents list items in ascending order(4,3,2,1).
<ol reversed> <li>...</li> </ol>
start start attribute specifies a custom value for the list item markers.
<ol start="an integral value"> <li>...</li> </ol>
type type attribute represents the kind of list item marker.
<ol type="1"> <li>...</li> </ol>


Was this article helpful?

 

Email:

Message:

Get the newsletter