agyanadda@gmail.com

HTML Lists

HTML Text & Links 1 min read Updated Nov 30, 2026 Topic 9 of 33

Lists group related items. HTML has three kinds.

Unordered list — <ul>

Items shown with bullets. Use when order does not matter (features, ingredients).

Ordered list — <ol>

Items shown with numbers. Use when order matters (steps, rankings). You can change the numbering with type="A", type="i" or start="5".

Description list — <dl>

Terms (<dt>) with descriptions (<dd>), like a glossary.

Nested lists

Put a whole <ul> or <ol> inside an <li> to create sub-items.

Examples

Example — Unordered and ordered lists HTML
<h3>Skills I am learning</h3>
<ul>
  <li>HTML</li>
  <li>CSS</li>
  <li>JavaScript</li>
</ul>

<h3>Steps to make tea</h3>
<ol>
  <li>Boil water</li>
  <li>Add tea leaves and sugar</li>
  <li>Add milk and boil again</li>
</ol>
Example — Nested and description lists HTML
<ul>
  <li>Frontend
    <ul>
      <li>HTML</li>
      <li>CSS</li>
    </ul>
  </li>
  <li>Backend
    <ul>
      <li>PHP</li>
      <li>MySQL</li>
    </ul>
  </li>
</ul>

<dl>
  <dt>HTML</dt>
  <dd>The structure of a web page.</dd>
  <dt>CSS</dt>
  <dd>The design of a web page.</dd>
</dl>

Test Yourself With Exercises

Exercise 1 Multiple Choice

Which list shows numbers?

Exercise 2 Fill in the Blank

Every list item is written inside the ___ tag.

Exercise 3 True / False

A list can be placed inside another list item.

Frequently Asked Questions

Use CSS: ul { list-style: none; padding: 0; }. This is common for navigation menus.