HTML & CSS
/Beginner
Lists
Definition
HTML provides three types of lists: Unordered Lists `<ul>` (bullet points), Ordered Lists `<ol>` (numbered), and Description Lists `<dl>`.
Explain Like I'm New
If you need to list items, use a list tag! You wrap the entire list in a `<ul>` or `<ol>` container, and then wrap every single item inside it with an `<li>` (List Item) tag.
Real World Example
Navigation menus are almost always built using an Unordered List `<ul>` where the bullets are hidden using CSS. Recipe steps are built using an Ordered List `<ol>`.
Common Use Cases
- •Bullet points
- •Numbered instructions
- •Navigation bars
Interactive Example
Interview Questions
basic
- What is the difference between `<ul>` and `<ol>`?
intermediate
- Can you put a list inside of another list?