📋 CSS List Properties
Last Updated: November 2025
Lists are used to display items in sequence, either ordered (<ol>) or unordered (<ul>).
CSS gives you control over how list bullets, numbers, and spacing appear.
CSS List Properties
List Style Types
🎨 list-style-position
This property controls where the bullet/number is placed relative to the text.
ul {
list-style-position: inside;
}
Options:
- outside → bullets stay outside the content box (default)
- inside → bullets move inside (align with text)
🗣 Hinglish Tip: Agar text wrap hota hai, inside me bullet bhi text ke saath move karega.
🔗 Shorthand Property: list-style
Combine multiple list properties into one:
ul {
list-style: square inside url("icon.png");
}
💡 Order: list-style-type → list-style-position → list-style-image
