HTML Lists — ol, ul and dl Tags
Learn all three HTML list types — ordered lists, unordered lists, and description lists — with examples, live previews, nested lists, bullet styles, and CSS styling tips.
- What are HTML Lists?
- Ordered List <ol>
- Number Types
- Unordered List <ul>
- Bullet Styles
- Description List <dl>
- Nested Lists
- CSS Styling
- Try It Yourself
- Summary
- FAQ
What are HTML Lists?
HTML lists group related items together. They're essential for navigation menus, step-by-step instructions, bullet points, and glossaries. HTML has three types:
Ordered List — <ol>
<ol> + <li> — Numbered List
The browser auto-numbers each <li> — you never type numbers manually. Use when sequence matters.
<h3>Steps to Learn HTML</h3> <ol> <li>Learn HTML basics</li> <li>Study CSS for styling</li> <li>Practice with projects</li> <li>Learn JavaScript</li> </ol>
Steps to Learn HTML
- Learn HTML basics
- Study CSS for styling
- Practice with projects
- Learn JavaScript
Ordered List — Number Types
<!-- Uppercase letters --> <ol type="A"> <li>HTML</li> <li>CSS</li> </ol> <!-- Start from 5 --> <ol start="5"> <li>This starts at 5</li> </ol>
Unordered List — <ul>
<ul> + <li> — Bullet List
Each item gets a bullet point (•) by default. Use when order doesn't matter — features, navigation links, ingredients.
<h3>TipsInLearning Courses</h3> <ul> <li>HTML for Beginners</li> <li>CSS Fundamentals</li> <li>Bootstrap 5</li> <li>JavaScript Basics</li> </ul>
Bullet Styles
<ul style="list-style-type: disc;"><li>Disc (default)</li></ul> <ul style="list-style-type: circle;"><li>Circle</li></ul> <ul style="list-style-type: square;"><li>Square</li></ul> <ul style="list-style-type: none;"><li>No bullet (for nav menus)</li></ul>
Description List — <dl>
<dl> <dt> <dd> — Term & Definition
<dt> = Definition Term (the word/key). <dd> = Definition Description (the meaning). Great for glossaries, FAQs, and key-value data.
<dl> <dt>HTML</dt> <dd>HyperText Markup Language — the standard language for web pages.</dd> <dt>CSS</dt> <dd>Cascading Style Sheets — used to style web pages.</dd> </dl>
- HTML
- HyperText Markup Language — the standard language for web pages.
- CSS
- Cascading Style Sheets — used to style web pages.
Nested Lists
Place a list inside an <li> to create sub-items:
<ul> <li>Frontend Development <ul> <li>HTML</li> <li>CSS</li> <li>JavaScript</li> </ul> </li> <li>Backend Development <ul> <li>Node.js</li> <li>Python</li> </ul> </li> </ul>
Styling Lists with CSS
ul.custom { list-style: none; padding: 0; } ul.custom li { padding: 8px 12px; border-left: 4px solid #7c3aed; margin-bottom: 6px; background: #f3eeff; border-radius: 0 8px 8px 0; }
Pro Tip: list-style: none removes all bullets/numbers. This is the standard technique for building navigation menus from <ul> and <li> elements.
Try It Yourself
Questions Beginners Ask
Common questions about HTML lists: