How to Create Lists in HTML: Ordered, Unordered, and Description Lists
HTML has three kinds of lists: ordered, unordered and description lists. Here's how each one works and when you should use it.
- Reading time
- 2 min read
- Comments
- Discussion

On this page
Unordered List <ul>
Use this when the order of items doesn’t matter (like a shopping list or features list).
<ul> <li>HTML</li> <li>CSS</li> <li>JavaScript</li> </ul>
The browser will usually show bullet points by default.
Ordered List <ol>
Use this when the order is important (steps, rankings, instructions).
<ol> <li>Open the editor</li> <li>Write your code</li> <li>Save the file</li> </ol>
You can also change the numbering style with the type attribute:
<ol type="A"> <li>First item</li> <li>Second item</li> </ol>
Common values: 1 (numbers), A (uppercase letters), a (lowercase), I (Roman numerals).
Description List <dl>
Use this for terms and their descriptions (like a glossary or product details).
<dl> <dt>HTML</dt> <dd>A markup language for creating web pages.</dd> <dt>CSS</dt> <dd>A language used to style HTML elements.</dd> </dl>
<dt>= the term<dd>= the description
Nested Lists
You can put a list inside another list:
<ul>
<li>
Frontend
<ul>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
</ul>
</li>
<li>
Backend
<ul>
<li>Node.js</li>
<li>Python</li>
</ul>
</li>
</ul>
This works with both <ul> and <ol>.
When to Use Each List
| List Type | Best Used For | Example |
|---|---|---|
Unordered <ul> |
Items where order doesn’t matter | Features, ingredients |
Ordered <ol> |
Steps, rankings,sequences | Tutorials, top 10 list |
Description <dl> |
Terms + explanations | Glosarry, definitions |
Full Example
<!DOCTYPE html>
<html lang="en">
<head>
<title>HTML Lists</title>
</head>
<body>
<h1>Learning Web Development</h1>
<h2>Topics to Learn</h2>
<ul>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
</ul>
<h2>Learning Steps</h2>
<ol>
<li>Learn the basics of HTML</li>
<li>Practice building simple pages</li>
<li>Move on to CSS</li>
</ol>
<h2>Key Terms</h2>
<dl>
<dt>Tag</dt>
<dd>The basic building block of HTML.</dd>
<dt>Element</dt>
<dd>A complete HTML structure with opening and closing tags.</dd>
</dl>
</body>
</html>
Quick Tips
- Always use
<li>inside<ul>or<ol>. - Don’t use lists just for spacing or layout, that’s what CSS is for.
- Nested lists are great for showing hierarchy.
- Choose the list type based on meaning, not just appearance.
Using the right type of list makes your content clearer and more meaningful for both users and search engines.

Written by
Razak
Writes about the web, slowly, and builds small tools on the side.
Keep reading
Read next
1 minBest Practices for Writing Clean and Valid HTML
A collection of HTML best practices including proper indentation, naming, W3C validation, and common beginner mistakes you should avoid.
Read article
2 minGetting to Know HTML Iframe: How to Embed YouTube and Google Maps
How to use the HTML <iframe> tag to embed content from other sites, like a YouTube video or a Google Map, inside your own page.
Read article
1 minHow to Create Forms in HTML for Beginners
A beginner's guide to HTML forms: how the <form> tag sends data for logins, sign-ups and contact messages, starting from the basics.
Read article
Discussion
Comments
Loading comments…