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:
- 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
<ul> <li> Omkar </li> <li> Sudipto </li> <li> Pratik </li> <li> Sachin </li> </ul>
The above code would result into this.
You can see we have bullets but not numbers. Thus this is an un-ordered list.
To create an ordered list, all you have to do is just replace <ul> tags by <ol> tags.
<ol> <li> Omkar </li> <li> Sudipto </li> <li> Pratik </li> <li> Sachin </li> </ol>
And it would result into:
So that’s all in this tutorial. If you have any questions, feel free to comment below.