HTML List

In this tutorial, we will learn about HTML List. HTML list is normally used to show ordered or un-ordered list in HTML. For example, you want to show a list of available food items on a restaurant website. In this case, you can use HTML List. We have a total of three types of lists available in HTML.

  • Ordered List
  • UnOrdered List
  • Description List

Ordered List :

In Ordered list, all the list items will be marked with numbers by default. Ordered lists start and ends with Ol tag and we write all the list items in li tag. Check this example.

<ol>
  <li>Pizza</li>
  <li>Burger</li>
  <li>Sandwich</li>
</ol>

Output:

  1. Pizza
  2. Burger
  3. Sandwich

Unordered List :

In UnOrdered list, all the list items will be marked with dots by default. UnOrdered starts and ends with ul tag and we write all the list items in li tag. Check this example.

<ul>
  <li>Pizza</li>
  <li>Burger</li>
  <li>Sandwich</li>
</ul>

Output:

  • Pizza
  • Burger
  • Sandwich

Description List :

Description list starts with dl tag and after that, we use two tags dt and dd tags to add description title and description data respectively.

<dl>
  <dt>Pizza</dt>
    <dd>250 Rs</dd>
  <dt>Burger</dt>
    <dd>110 Rs</dd>
  <dt>Sandwich</dt>
     <dd>100 Rs</dd>
</dl>

Output:

Pizza

250 Rs

Burger

110 Rs

Sandwich

100 Rs

Spread the love
Scroll to Top
×