list-style-type

Sets the type of list item marker: bullets, numbers, letters, or a custom symbol.

Initial value
disc
Inherited
Yes
Animatable
no
Applies to
list items (display: list-item)
JavaScript
element.style.listStyleType = "square"
On this page

Example

#
CSS
.checklist {
  list-style-type: "βœ… ";
}

.nav-list {
  list-style-type: none;
  padding: 0;
}
Preview

Definition and usage

#

The list-style-type property changes the markers before the items of <ul> and <ol> lists. You can choose shapes (disc, circle, square), numbering (decimal, lower-alpha, upper-roman), and many numbering systems of different languages.

You can also provide your own string, for example "βœ“ " or "β†’ ", which replaces the bullet. The none value removes markers, which is common in navigation menus.

The property is inherited and works on elements with display: list-item, which by default means <li>.

Syntax

#
Syntax
list-style-type: disc | circle | square | decimal | lower-alpha | upper-roman | none | "<string>" | …;

Values

#
  • disc

    Filled circles, the default for bulleted lists.
  • square

    Small squares.
  • decimal

    Arabic numerals: 1, 2, 3.
  • upper-roman

    Roman numerals: I, II, III.
  • "βœ“ "

    string

    A custom character before each item.
  • none

    No markers.

Values in practice

#

disc

Filled circles, the default for bulleted lists.
.demo { list-style-type: disc; }

square

Small squares.
.demo { list-style-type: square; }

decimal

Arabic numerals: 1, 2, 3.
.demo { list-style-type: decimal; }

upper-roman

Roman numerals: I, II, III.
.demo { list-style-type: upper-roman; }

"βœ“ "

A custom character before each item.
.demo { list-style-type: "βœ“ "; }

none

No markers.
.demo { list-style-type: none; }

Browser support

#

Widely available

Works in all modern browsers, phones included. You can use it without worry.

  • Chrome
  • Edge
  • Firefox
  • Safari

Good practices

#
  • In Safari, lists without markers (none) may stop being announced as lists by screen readers. In navigation, add role="list" to the <ul>.
  • You can change the colour and size of the marker itself with the ::marker pseudo-element.

Related entries

#

Practise it in lessons

#

Spotted a mistake or missing an example? Write to us.