HTML Basics
HTML Lists
Learn how to organize information using ordered and unordered lists
📝
Why Use Lists?
Lists help organize information in a clear, easy-to-read way. There are two main types: ordered (numbered) and unordered (bulleted) lists.
Code Example:
📄 html
1
2
3
4
5
6
7
8
9
10
11
12
13
<!-- Unordered list (bullets) --><ul> <li>Apples</li> <li>Bananas</li> <li>Oranges</li></ul> <!-- Ordered list (numbers) --><ol> <li>Wake up</li> <li>Brush teeth</li> <li>Eat breakfast</li></ol>Use <ul> for unordered lists (when order doesn't matter) and <ol> for ordered lists (when order is important). Each item uses the <li> tag.