HTML ol tag

  • In HTML, two different tags can be used for listing. These are <ul> and <ol>.
  • ol stands for ordered list. <li> tag needs to be used to in order to create the list elements.
  • <ol> tag is used with the li tag. <li> tags are contained within the ol tag, and they express the elements of the list.
  • <ol> tag can have type and start parameter. Type parameter of the html ol tag is used to denote the type of the ordered list. In ordered listing, bullet points appear as 1, 2, 3 as a default setting. However, with the help of type parameter, we can change this into
  • Lowercase letters like a, b, c
  • Uppercase letters like A, B, C
  • Lowercase Roman numerals like i, ii, iii
  • Uppercase Roman numerals like I, II, III
  • Numerical list like 1, 2, 3 (Default)

Start parameter of the ol tag is used to make the start the list from any element. Normally, the list starts as 1, 2, 3…, but we can make this 4, 5, 6… or 7, 8, 9… with the help of start parameter.

HTML ol tag

<ol>
  <li>Item 1</li>
  <li>Item 2</li>
  <li>Item 3</li>
</ol>
  1. Item 1
  2. Item 2
  3. Item 3

HTML ol type

<ol type="A">
  <li>Item 1</li>
  <li>Item 2</li>
  <li>Item 3</li>
</ol>
<ol type="a">
  <li>Item 1/li>
  <li>Item 2</li>
  <li>Item 3</li>
</ol>
<ol type="i">
  <li>Item 1/li>
  <li>Item 2</li>
  <li>Item 3</li>
</ol>
<ol type="I">
  <li>Item 1</li>
  <li>Item 2</li>
  <li>Item 3</li>
</ol>
  1. Item 1
  2. Item 2
  3. Item 3
  1. Item 1/li>
  2. Item 2
  3. Item 3
  1. Item 1
  2. Item 2
  3. Item 3
  1. Item 1
  2. Item 2
  3. Item 3
369 Views
80030cookie-checkHTML ol tag

Leave a Reply

Your email address will not be published. Required fields are marked *