What is Ordered List in HTML





                                     Ordered List


Ordered List is <ol>defined by Tag. And <li>define List Item with Element. Order List is also called Numbered List. OL is used to show one type of information in a unit fixed order. In OL List, the first number of List Items is written by Order.


Check it.


To explain the order list, we have taken the example given above. You copy the below HTML code and paste it into your notepad++ or by typing this code with your hands, save the file as orderlist.html And open it.



<!DOCTYPE html>
<html>
<head>
<title>HTML Ordered List Example</title><body>
<ol>
<li>HTML</li>
<li>CSS</li>
<li>Jquery</li>
</ol>
</body>
 </html>

When you will see the above code in the browser, you will see a result like this.


  1. HTML
  2. CSS
  3. Jquery


Type Of Attribute in Ordered List 


The type attribute is used to define the list style type in an ordered list. “Number” is used for List Items in By Default OL List. But, with the help of Type Attribute, we can apply 5 other types of List Style Type apart from Number.


  1. Number (Default) – 1
  2. Uppercase Letter – A
  3. Lowercase Letter – a
  4. Uppercase Roman Number – I
  5. Lowercase Roman Number – i
  6. None

Check it.

We are explaining to you all the List Style Types mentioned above by an example. For this we are taking the example given above. There we type the List Style Type Using Attribute A are Set.


<!DOCTYPE html>
<html>
<head>
<title>HTML Ordered List Example</title><body>
<ul type=”A”>
<li>HTML</li>
<li>CSS</li>
<li>Jquery</li>
</ul>
</body> 
</html>


When you will see the above code in the browser, you will see a result like this. 


  1. Computer
  2. Table
  3. Mobile


As you List Style Type the A's Set. Similarly , 1 , a , I , i and none (no style) can be set. You just have to write the rest of the Style Type in place of A and the List Style Type will change.

Post a Comment

0 Comments