Difference between an ordered and unordered list.

Q5. What is the difference between an ordered and unordered list?

Ans. In an unordered list, the list items are represented in the bulleted form. The <UL> tag is used to define items in an unordered format; whereas, in an ordered list, the list items are represented in the alphabetical, numerical, or roman numerical form. The <OL> tag is used to create an ordered list.

Example of ordered list:

<HTML>

<HEAD>

<TITLE> WELCOME TO HTML</TITLE>

</HEAD>

<BODY>

<OL>

<LI>Sumit

<LI> Gopal

</OL>

</BODY>

</HTML>

 

Example of unordered list:

<HTML>

<HEAD>

<TITLE> WELCOME TO HTML</TITLE>

</HEAD>

<BODY>

<UL>

<LI>Sumit

<LI> Gopal

</UL>

</BODY>

</HTML>

 

Leave a Reply

Your email address will not be published. Required fields are marked *

5 Views
%d bloggers like this: