SA-21/06, C-11, Asapur, Varanasi, UP support@kamaldnp.com +91 8318013442
Lesson 18 of 30

HTML Lists

2 min read · Free · No login needed

Lists group related items together. HTML has three kinds: unordered lists (<ul>) with bullets, ordered lists (<ol>) with numbers, and description lists (<dl>) with terms and their meanings. Each item in the first two is an <li> element.

Unordered lists — ul

Use <ul> when the order does not matter: a shopping list, a set of features, a navigation menu. The browser shows a bullet before each item by default.

Ordered lists — ol

Use <ol> when the order matters: steps in a recipe, the top 5 of anything, instructions. The browser numbers the items automatically — 1, 2, 3. You can change the numbering with the type attribute (type="A" gives A, B, C; type="i" gives i, ii, iii) and start from any number with start="5".

Description lists — dl

Use <dl> for name-value pairs: a glossary, a FAQ, or a list of terms. Each term is a <dt> and each description is a <dd>.

Nesting lists

A list can sit inside a list item. This is how multi-level menus are built: a <ul> inside an <li> of another <ul>. Just remember to close the inner list before closing the item that holds it.

Tip: Navigation menus on almost every website are just unordered lists styled with CSS. Learn lists well and you have learned the skeleton of every menu.

Example

Example
<!DOCTYPE html>
<html>
<head>
<title>Lists</title>
</head>
<body>

<h2>Shopping List</h2>
<ul>
<li>Milk</li>
<li>Bread</li>
<li>Eggs</li>
</ul>

<h2>Steps to Make Tea</h2>
<ol>
<li>Boil water.</li>
<li>Add tea leaves.</li>
<li>Pour and serve.</li>
</ol>

</body>
</html>

Output

Output — how it looks in the browser
Output of HTML Lists
Try it yourself: copy the code above into a file named test.html, open it in your browser, and change the text to see what happens. That is how you learn — by changing things and watching the result.
Get certified — just ₹10

Finish all 30 lessons, pass the test (80%), pay ₹10 and get your certificate.

Take the test
Go further with a full course

Free tutorials teach you the basics. Our paid courses add live projects, mentorship and a certificate.

AI Power Skills in 2 Days | Learn AI Text, Image, Video and Voice Tools
View
Android & iOS App Development using Flutter 2026
₹5,000
View
WordPress Website Development Course (10 Days)
₹399
View
Browse all courses
HTML — Lessons
1. HTML Introduction 2. HTML Editors 3. HTML Basic 4. HTML Elements 5. HTML Attributes 6. HTML Headings 7. HTML Paragraphs 8. HTML Styles 9. HTML Formatting 10. HTML Comments 11. HTML Colors 12. HTML CSS 13. HTML Links 14. HTML Images 15. HTML Favicon 16. HTML Page Title 17. HTML Tables 18. HTML Lists 19. HTML Block and Inline Elements 20. HTML Div 21. HTML Classes 22. HTML Id 23. HTML Iframes 24. HTML JavaScript 25. HTML File Paths 26. HTML Head 27. HTML Layout 28. HTML Responsive 29. HTML Semantics 30. HTML Forms
Final Test — Certificate ₹10

🤖 KAMALDNP AI Assistant

Ask about courses, website & more

Hi! I'm KAMALDNP AI Assistant. Ask me about our courses, website features, or anything else! 😊
Please wait 5s...
🛡️ 7-Day Money-Back Guarantee
🤖 KAMALDNP Assistant ✕

Request human callback:

🔐 Login Required
✕

Download karne ke liye login karo. Login ke baad yahi page pe rahoge!

Naya ho? Register karo →