What Does the list-style-type Property Control in CSS?

The list-style-type property in CSS is used to control the appearance of bullets or markers in HTML lists. Whether you’re working with unordered lists (<ul>) or ordered lists (<ol>), this property allows you to define how list items are markedโ€”giving you precise control over your list styling.

In this post, weโ€™ll explore what list-style-type does, how to use it, and which values are commonly available.


๐Ÿ“ What Is list-style-type?

The list-style-type property sets the marker style for a list item element. It applies to:

  • <ul> โ€“ unordered lists
  • <ol> โ€“ ordered lists
  • <li> โ€“ individual list items

Syntax:

selector {
  list-style-type: value;
}

๐Ÿ“‹ Common Values for list-style-type

๐Ÿ”น Unordered Lists (<ul>)

These use simple shapes like bullets:

ValueDescription
discSolid circle (default)
circleHollow circle
squareSolid square
noneNo marker

Example:

ul {
  list-style-type: square;
}

๐Ÿ”ธ Ordered Lists (<ol>)

These use numbers, letters, or Roman numerals:

ValueDescription
decimal1, 2, 3, … (default)
decimal-leading-zero01, 02, 03, …
lower-alphaa, b, c, …
upper-alphaA, B, C, …
lower-romani, ii, iii, …
upper-romanI, II, III, …

Example:

ol {
  list-style-type: upper-roman;
}

๐Ÿšซ Removing List Markers

To remove bullets or numbers from a list:

ul {
  list-style-type: none;
  padding-left: 0; /* optional: removes indentation */
}

This is common in nav menus and custom list styles where you want full design control.


โœ… Where to Apply list-style-type

You can apply it directly to:

  • <ul> or <ol> (entire list)
  • <li> (individual list items, for granular control)
li.special {
  list-style-type: square;
}

๐Ÿงฉ Related Properties

  • list-style: Shorthand for list-style-type, list-style-position, and list-style-image.
  • list-style-position: Controls whether the marker is inside or outside the content box.
  • list-style-image: Replaces the bullet with a custom image.

๐Ÿ“ Final Thoughts

The list-style-type property gives you flexibility to style lists exactly how you wantโ€”from traditional bullets to custom numbering schemes or no markers at all. Mastering this property allows you to build cleaner menus, readable documentation, or stylish interfaces without relying on extra HTML or JavaScript.

Sharing Is Caring:

Leave a Comment