📋 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

PropertyDescriptionExample
list-style-typeDefines bullet or numbering stylelist-style-type: square;
list-style-positionSets bullet position inside or outsidelist-style-position: inside;
list-style-imageUses a custom image as bulletlist-style-image: url('icon.png');
list-styleShorthand for all list propertieslist-style: square inside;

List Style Types

TypeExampleOutput
discDefault for <ul>• Item
circlelist-style-type: circle;○ Item
squarelist-style-type: square;■ Item
decimalDefault for <ol>1. Item
upper-romanlist-style-type: upper-roman;I. Item
lower-alphalist-style-type: lower-alpha;a. Item
nonelist-style-type: none;(no bullet)

🎨 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