Skip to content

Lists

We make all kinds of lists in our regular life. Adding lists in the HTML document is very easy.

Let add a List

We usually start a list by <ol> and end it by </ol>. Each item in the list is surrounded by <li> and </li>.

So for example metros of India list will have

<ol>
    <li>Delhi</li>
    <li>Mumbai</li>
    <li>Kolkatta </li>
    <li>Chennai</li>
</ol>

This produced a numbered list with automatic numbering. This is called ordered list aka ol. As you can see each item inside the list is surrounded by li aka list item tag.

We can also do just a bulleted list

How to unordered list

By just changing the ol with 'ul'. Its called unordered list.

<ul>
    <li>Delhi</li>
    <li>Mumbai</li>
    <li>Kolkatta </li>
    <li>Chennai</li>
</ul>

What more

You can also format the text inside the list items. You can also add other tags inside these.

Authors(Git):Thejesh GN(100.0%)