Computerhelp4all logo Articles AboutTopicsQuizzesComputer Questions & AnswersComputer Terms & DefinitionsActivitiesContact

What Is The HTML <ol> Tag?

What Is The HTML Ol Tag

Date First Published: 7th February 2023

Topic: Web Design & Development

Subtopic: Web Development

Article Type: Computer Terms & Definitions

Difficulty: Medium

Difficulty Level: 5/10

Learn more about what the HTML <ol> tag is in this article.

In HTML, the <ol> tag is used to define an ordered list, which groups items that have a numerical or alphabetical ordering. By default, the content of the <ol> tag is numbered. This tag is supported by all major web browsers.

Note: Info Icon

To create an unordered (bulleted) list, use the <ul> tag.


Examples Of The <ol> Tag

Examples of the <ol> tag with the output can be seen below:

<h2>Ordered List</h2> <ol> <li>Tea</li> <li>Coffee</li> <li>Milk</li> </ol>

Ordered List

  1. Tea
  2. Coffee
  3. Milk
<h2>Ordered List That Starts At Number 10</h2> <ol start="5"> <li>Tea</li> <li>Coffee</li> <li>Milk</li> </ol>

Ordered List That Starts At Number 10

  1. Tea
  2. Coffee
  3. Milk
<h2>Ordered List With Alphabetical Ordering</h2> <ol type="A"> <li>Tea</li> <li>Coffee</li> <li>Milk</li> </ol>

Ordered List With Alphabetical Ordering

  1. Tea
  2. Coffee
  3. Milk
Note: Info Icon

The <li> tags are used to define list items.

Attributes

Attribute Description
compact Reduces indents and spacing between lines. Not supported in HTML5.
reversed Indicates that the items should go in descending order.
start Sets the start value of an ordered list.
type Sets the type of list marker to use.


Feedback

  • Is there anything that you disagree with on this page?
  • Are there any spelling, grammatical, or punctuation errors on this page?
  • Are there any broken links or design errors on this page?

If so, it is important that you tell me as soon as possible on this page.