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.

<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 </>

Procedure to make a recipie(with order)

  1. place all ingredients except the kitchen in the crock pot.
  2. stir until mixed.
  3. add the chicken and coat well with the sauce.
  4. cover and cook on higher for 2-3 hours or on low for 7-8 hours.

Tag Uses

Specific uses of <ol> tag

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

Tag omission

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

Global Attributes

All the global attributes are applicable on the ol tag.

Tag Attributes

Attributes that are applicable to <ol> tag
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?