HTML5
HTML5

HTML Lists

Lists are perfect when you have several related items. HTML has unordered lists and ordered lists. <ul> creates a list where order does not matter. Each item goes inside <li>. <ol> creates a numbered list where order matters. It also uses <li> for every item. You can put one list inside an <li> to create a nested list. This is useful for menus, outlines, categories, and multi-step instructions.

Why this matters

  • ·Lists group related items clearly.
  • ·Ordered lists show sequence automatically.
  • ·Nested lists can show levels of information.

Common mistakes

  • ·Putting plain text directly inside <ul> or <ol> is not the correct structure.
  • ·Using <ol> when order does not matter can confuse the meaning.
  • ·Very deep nested lists can become hard to read.
Your codeHTML
Live preview

Frequently asked questions

<li>.

Practice questions

Question 1

Create a three-item unordered list of favorite foods.

Your codeHTML
Live preview

Question 2

Create an ordered list of three steps for making tea.

Your codeHTML
Live preview

Quick check

Just for this topic answer honestly, then check yourself.

1 / 3

Which tag creates a numbered list?