VOOZH about

URL: https://www.geeksforgeeks.org/html/html-ol-type-attribute/

⇱ HTML <ol> type Attribute - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

HTML <ol> type Attribute

Last Updated : 23 May, 2026

The HTML <ol> type attribute is used to specify the numbering style of an ordered list.

  • Used with the <ol> tag.
  • Common values include 1, A, a, I, and i.
  • It changes how list items are numbered or labeled.

Syntax: 

<ol type="1 | a | A | i | I">
  • 1: This is the default value. It defines the list items in decimal numbers.(1, 2, 3, 4 .).
  • a: It defines the list items in alphabetically ordered lowercase letters .(a, b, c, d ...)
  • A: It defines the list items in alphabetically ordered uppercase letters.(A, B, C, D ..)
  • i: It defines the list items in lowercase roman number order.(i, ii, iii, iv, v, vi ...)
  • I: It defines the list items in uppercase roman number order.(I, II, III, IV, V, VI ..)

HTML <ol> type attribute Examples

Example 1: We defines an ordered list (<ol>) with the type="1" attribute, specifying numbering style as decimal. It lists HTML, CSS, and JS. The page also displays a title and a heading.

Example 2: Demonstrates various list types using the <ol> element's type attribute: decimal numbering (1, 2, 3), alphabetical (a, b, c), uppercase alphabetical (A, B, C), lowercase Roman numerals (i, ii, iii), and uppercase Roman numerals (I, II, III).

Comment
Article Tags: