Ordered and Un-ordered Lists in HTML

Lists are very useful in HTML documents. You can use them to number, bullet important point in your documents or simply list couple of items together in an ordered or un-ordered way.

HTML Lists can be classified into two Categories:

  1. Ordered List
  2. Un-Ordered List

Un-Ordered List

To create an un-ordered list, you need to use <ul> tag. Then after to add every item to the list you need to use <li> tag. Check out the code given below.

Try it yourself atĀ Codefap HTML EditorĀ 

[html]

<ul>
<li> Omkar </li>
<li> Sudipto </li>
<li> Pratik </li>
<li> Sachin </li>
</ul>

[/html]

The above code would result into this.

You can see we have bullets but not numbers. Thus this is an un-ordered list.

Ordered List

To create an ordered list, all you have to do is just replace <ul> tags by <ol> tags.

[html]

<ol>
<li> Omkar </li>
<li> Sudipto </li>
<li> Pratik </li>
<li> Sachin </li>
</ol>

[/html]

And it would result into:

So that’s all in this tutorial. If you have any questions, feel free to comment below.

Leave a Reply

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