Skip to content
Related Articles

Related Articles

Improve Article

HTML | <ol> type Attribute

  • Last Updated : 27 Mar, 2020

The HTML <ol> type Attribute defines which type(1, A, a, I and i) of order you want in your list numeric, alphabetic or roman numbers.

Syntax:

<ol type="1 | a | A | i | I">

Attribute Values

  • 1: This is the default value. It defines the list items in decimal number.(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 ..)

Example:




<!DOCTYPE html> 
<html
  
<head
    <title>HTML ol type attribute</title
</head
  
<body
    <h1 style="color:green;">GeeksforGeeks</h1
    <h3>HTML ol Type attribute</h3
  
    <p>Type attribute</p
      
  
    <p>start attribute</p
    <ol type="1"
        <li>HTML</li
        <li>CSS</li
        <li>JS</li
    </ol
  
  
</body
  
</html>   

Output:

Supported Browsers: The browser supported by ol type attribute listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Safari

Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.

My Personal Notes arrow_drop_up
Recommended Articles
Page :