Skip to content
Related Articles

Related Articles

HTML | <ol> type Attribute

View Discussion
Improve Article
Save Article
  • Last Updated : 21 Jun, 2022
View Discussion
Improve Article
Save Article

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: 

html




<!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 
  • Edge version 12 and above
  • Firefox version 1 and above
  • Internet Explorer 
  • Opera 
  • Safari 
My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!