HTML | <ol> type Attribute

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:

filter_none

edit
close

play_arrow

link
brightness_4
code

<!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>   

chevron_right


Output:

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

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

full-stack-img

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.