Open In App

HTML | <li> type Attribute

The <li> type attribute in HTML is used to specify the type of a list items. This attribute also defines the style of the bullet point of the list items. 

Syntax: 



<li type="1|a|A|i|I|disc|circle|square">

Attribute Values: 
For ordered list items:  

For unordered list items:  



Note: The <li> type attribute is not supported by HTML 5 Instead of using this attribute we can use CSS list-style-type property.

Example 1:  




<!DOCTYPE html>
<html>
 
<head>
    <title>
        HTML li type Attribute
    </title>
</head>
     
<body>
     
    <h1 style = "color: green;">
        GeeksforGeeks
    </h1>
             
    <h2>
        HTML list item type Attribute
    </h2>
             
     
 
<p>Sorting Algorithms</p>
 
  
         
    <ol>
        <li type="a">Merge sort</li>
        <li>Quick sort</li>
        <li type="I">Insertion sort</li>
    </ol>
</body>
 
</html>                   

Output: 

Example 2:  




<!DOCTYPE html>
<html>
 
<head>
    <title>
        HTML li type Attribute
    </title>
</head>
     
<body>
     
    <h1 style = "color: green;">
        GeeksforGeeks
    </h1>
             
    <h2>
        HTML li type Attribute
    </h2>
             
     
 
<p>Sorting Algorithms</p>
 
  
         
    <ul>
        <li>Merge sort</li>
        <li>Quick sort</li>
        <li type="square">Insertion sort</li>
    </ul>
</body>
 
</html>                   

Output: 

Supported Browsers: The browser supported by HTML <li> type attribute are listed below:  

 


Article Tags :