Open In App
Related Articles

HTML | <ol> type Attribute

Improve Article
Improve
Save Article
Save
Like Article
Like

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 
Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 21 Jun, 2022
Like Article
Save Article
Previous
Next
Similar Reads
Complete Tutorials