CSS list-style-type Property

The CSS list-style-type property specifies the type of marker displayed for a list item, such as a bullet, number, letter, symbol, or custom counter style.

It is commonly used with ordered and unordered HTML lists, but it also applies to other elements that generate list-item markers. The property supports predefined counter styles, custom strings, and counter styles defined with the @counter-style rule.

list-style-type Syntax

The list-style-type property accepts a predefined counter style name, a custom counter style name, a string, or the keyword none.

Basic Syntax

selector {
  list-style-type: disc;
}

Common Values

ul {
  list-style-type: disc;
}
ul {
  list-style-type: circle;
}
ul {
  list-style-type: square;
}
ol {
  list-style-type: decimal;
}
ol {
  list-style-type: lower-alpha;
}
ol {
  list-style-type: upper-roman;
}

Custom String

ul {
  list-style-type: "✓ ";
}

Remove Markers

ul {
  list-style-type: none;
}

CSS-Wide Keywords

ul {
  list-style-type: initial;
}
ul {
  list-style-type: inherit;
}
ul {
  list-style-type: unset;
}
ul {
  list-style-type: revert;
}
ul {
  list-style-type: revert-layer;
}

The initial value is disc. However, browser default styles commonly assign decimal to ordered lists and different bullet styles to nested unordered lists.

Property Values

The following values represent the main categories supported by list-style-type.

Value Description
disc Displays a filled circular bullet.
circle Displays a hollow circular bullet.
square Displays a filled square bullet.
decimal Displays decimal numbers such as 1, 2, and 3.
decimal-leading-zero Displays decimal numbers with leading zeros, such as 01, 02, and 03.
lower-alpha Displays lowercase alphabetic markers such as a, b, and c.
upper-alpha Displays uppercase alphabetic markers such as A, B, and C.
lower-roman Displays lowercase Roman numerals.
upper-roman Displays uppercase Roman numerals.
none Suppresses the marker generated by list-style-type.
<counter-style> Uses a predefined or custom counter style name.
<string> Uses a fixed string as the marker for every list item.
initial Resets the property to disc.
inherit Uses the computed value from the parent element.
unset Uses the inherited value because the property is inherited.
revert Reverts the property according to cascade origin rules.
revert-layer Reverts the property according to cascade layer rules.

Property Characteristics

Characteristic Value
Initial value disc
Inherited Yes
Applies to List items
Computed value As specified
Animation type Discrete
Percentages Not applicable
Primary purpose Specify list marker appearance

Although the initial value is disc, browser user-agent stylesheets establish familiar default markers for HTML ordered and unordered lists.

How It Works

Elements with display: list-item generate a marker box. The list-style-type property determines the content of that marker when an image marker is not being displayed.

HTML Example

<ul>
  <li>HTML</li>
  <li>CSS</li>
  <li>JavaScript</li>
</ul>

Use Square Markers

ul {
  list-style-type: square;
}

Use Numbered Markers

ul {
  list-style-type: decimal;
}

Even though the HTML element is an unordered list, the CSS can display decimal markers. The underlying HTML semantics remain unchanged.

Restore Standard Unordered Markers

ul {
  list-style-type: disc;
}

Important Consideration

Marker appearance and list semantics are separate. Use <ol> when item order matters and <ul> when it does not.

Unordered List Markers

Unordered lists commonly use circular or square markers. The three traditional bullet styles are disc, circle, and square.

disc

ul {
  list-style-type: disc;
}

Displays a filled circular bullet.

circle

ul {
  list-style-type: circle;
}

Displays a hollow circular bullet.

square

ul {
  list-style-type: square;
}

Displays a filled square bullet.

Different Bullet Styles

.primary-list {
  list-style-type: disc;
}
.secondary-list {
  list-style-type: circle;
}
.tertiary-list {
  list-style-type: square;
}

Important Consideration

These markers are useful for nested lists because different shapes help distinguish levels without changing the HTML structure.

Ordered List Markers

Ordered lists support numeric and alphabetic marker styles. These styles automatically generate the appropriate marker for each item.

Decimal Numbers

ol {
  list-style-type: decimal;
}

Displays markers such as 1, 2, and 3.

Leading Zeros

ol {
  list-style-type: decimal-leading-zero;
}

Displays markers such as 01, 02, and 03 for small positive values.

Lowercase Letters

ol {
  list-style-type: lower-alpha;
}

Displays markers such as a, b, and c.

Uppercase Letters

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

Displays markers such as A, B, and C.

Lowercase Roman Numerals

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

Displays markers such as i, ii, and iii.

Uppercase Roman Numerals

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

Displays markers such as I, II, and III.

HTML Example

<ol class="roman-list">
  <li>Introduction</li>
  <li>HTML Structure</li>
  <li>CSS Styling</li>
</ol>

CSS Example

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

Important Consideration

Generated numbering follows the list's counter values. HTML attributes such as start, reversed, and value can affect numbering in ordered lists.

Additional Counter Styles

CSS defines additional counter styles for numbering systems used in different languages and writing systems.

Lowercase Greek

ol {
  list-style-type: lower-greek;
}

Arabic-Indic Digits

ol {
  list-style-type: arabic-indic;
}

CJK Decimal

ol {
  list-style-type: cjk-decimal;
}

Hebrew Numerals

ol {
  list-style-type: hebrew;
}

Other Counter Styles

Additional predefined styles include armenian, georgian, lower-latin, upper-latin, and several language-specific numbering systems.

Important Consideration

Support for individual counter styles can differ between browsers. Test language-specific styles and provide a suitable fallback when compatibility is important.

none Value

The none value suppresses the marker generated by list-style-type.

Remove Standard Bullets

ul {
  list-style-type: none;
}

Remove Numbering

ol {
  list-style-type: none;
}

Remove Markers and Indentation

ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

Image Marker Exception

ul {
  list-style-type: none;
  list-style-image: url("images/checkmark.svg");
}

The image marker can still appear because list-style-image takes precedence when a valid image is available.

Important Consideration

Removing visible markers does not remove the HTML list structure. However, some browser and screen reader combinations may not announce lists as expected when markers are removed. Test marker-free lists when list semantics are important.

String Markers

The list-style-type property can use a quoted string as a fixed marker. Unlike a counter style, a string does not automatically change from one list item to the next.

Checkmark Marker

ul {
  list-style-type: "✓ ";
}

Arrow Marker

ul {
  list-style-type: "→ ";
}

Star Marker

ul {
  list-style-type: "★ ";
}

CSS Escape Sequence

ul {
  list-style-type: "\2713  ";
}

The escape sequence represents a checkmark character. The additional space separates the marker from the list text.

Important Consideration

String markers display the same content for every item. Use a counter style when markers must change sequentially. Browser support for string values is newer than support for traditional marker keywords.

Custom Counter Styles

The CSS @counter-style rule allows you to define reusable marker styles and reference them by name with list-style-type.

Define a Symbolic Counter Style

@counter-style custom-stars {
  system: cyclic;
  symbols: "★";
  suffix: " ";
}
.star-list {
  list-style-type: custom-stars;
}

Every item displays a star marker using the custom counter style.

Define a Numeric Counter Style

@counter-style custom-binary {
  system: numeric;
  symbols: "0" "1";
  suffix: ". ";
}
.binary-list {
  list-style-type: custom-binary;
}

This counter style represents list numbers using binary digits.

Define a Fixed Sequence

@counter-style custom-steps {
  system: fixed;
  symbols: "①" "②" "③" "④";
  fallback: decimal;
  suffix: " ";
}
.step-list {
  list-style-type: custom-steps;
}

The first four items use the specified symbols. Values outside the supported range use the decimal fallback.

HTML Example

<ol class="step-list">
  <li>Create the HTML document</li>
  <li>Add the page structure</li>
  <li>Write the CSS rules</li>
  <li>Test the result</li>
</ol>

Important Consideration

Custom counter styles offer more flexibility than fixed strings because they can represent different counter values. Include an appropriate fallback for unsupported values or browsers.

Image Markers and Fallbacks

The list-style-image property can replace a marker generated by list-style-type.

Image Marker with Disc Fallback

ul {
  list-style-type: disc;
  list-style-image: url("images/checkmark.svg");
}

Image Marker with Square Fallback

ul {
  list-style-type: square;
  list-style-image: url("images/bullet.svg");
}

Disable the Image

ul {
  list-style-image: none;
  list-style-type: circle;
}

Important Consideration

When an image marker cannot be displayed, the browser uses list-style-type as the fallback. Choose a marker that remains appropriate for the list.

Marker Position

The list-style-position property controls whether a marker appears inside or outside the list item's principal content box.

Outside Markers

ul {
  list-style-type: square;
  list-style-position: outside;
}

Inside Markers

ul {
  list-style-type: square;
  list-style-position: inside;
}

Numbered List with Inside Markers

ol {
  list-style-type: decimal;
  list-style-position: inside;
}

Important Consideration

Marker position affects text wrapping and alignment, especially when list items contain multiple lines.

list-style Shorthand

The list-style shorthand combines list-style-type, list-style-position, and list-style-image.

Separate Properties

ul {
  list-style-type: square;
  list-style-position: outside;
  list-style-image: none;
}

Equivalent Shorthand

ul {
  list-style: square outside;
}

Ordered List Shorthand

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

Remove All Markers

ul {
  list-style: none;
}

Shorthand Reset Behavior

ul {
  list-style-type: upper-roman;
  list-style: inside;
}

The shorthand resets list-style-type to its initial value, disc.

Important Consideration

Omitted shorthand components reset to their initial values. Use the longhand property when changing only the marker type.

Individual List Items

Different list items can use different marker types through classes or structural selectors.

HTML Example

<ul class="mixed-list">
  <li class="standard">Standard Item</li>
  <li class="highlight">Highlighted Item</li>
  <li class="complete">Completed Item</li>
</ul>

CSS Example

.mixed-list {
  list-style-type: disc;
}
.mixed-list .highlight {
  list-style-type: square;
}
.mixed-list .complete {
  list-style-type: "✓ ";
}

Target the First Item

.mixed-list li:first-child {
  list-style-type: circle;
}

Target the Last Item

.mixed-list li:last-child {
  list-style-type: square;
}

Important Consideration

Individual marker styles are useful for visual emphasis, but important status information should also be included in the list item text.

Nested Lists

Nested lists can use different marker types to distinguish levels of information.

HTML Example

<ul class="nested-list">
  <li>HTML
    <ul>
      <li>Elements</li>
      <li>Attributes</li>
    </ul>
  </li>
  <li>CSS
    <ul>
      <li>Selectors</li>
      <li>Properties</li>
    </ul>
  </li>
</ul>

CSS Example

.nested-list {
  list-style-type: disc;
}
.nested-list ul {
  list-style-type: circle;
}

Three-Level List

.nested-list {
  list-style-type: disc;
}
.nested-list ul {
  list-style-type: circle;
}
.nested-list ul ul {
  list-style-type: square;
}

Nested Ordered Lists

.nested-ordered {
  list-style-type: decimal;
}
.nested-ordered ol {
  list-style-type: lower-alpha;
}
.nested-ordered ol ol {
  list-style-type: lower-roman;
}

Important Consideration

Because list-style-type is inherited, nested lists may reuse the parent marker style unless another declaration overrides it.

display: list-item

The list-style-type property can affect elements other than <li> when they generate list-item markers.

HTML Example

<div class="custom-list-item">HTML Elements</div>
<div class="custom-list-item">CSS Properties</div>

CSS Example

.custom-list-item {
  display: list-item;
  list-style-type: square;
  list-style-position: inside;
}

Important Consideration

Using display: list-item creates visual markers but does not automatically give an ordinary <div> the same semantic meaning as an HTML list item. Use native list elements for actual lists.

Inheritance

The list-style-type property is inherited. A marker style declared on a list container can be inherited by its list items.

Parent List Declaration

ul {
  list-style-type: square;
}

Override an Individual Item

ul li.special {
  list-style-type: circle;
}

Explicit Inheritance

li {
  list-style-type: inherit;
}

Reset to the Initial Value

li {
  list-style-type: initial;
}

This resets the marker type to disc.

Important Consideration

Browser default styles can also influence nested lists. Use explicit selectors when a consistent marker style is required across different list levels.

Accessibility

List markers help communicate the structure of a list visually, but semantic HTML remains essential for accessibility.

Use Ordered Lists for Sequences

<ol>
  <li>Create the HTML document</li>
  <li>Add the CSS stylesheet</li>
  <li>Test the page</li>
</ol>

Use Unordered Lists for Groups

<ul>
  <li>HTML</li>
  <li>CSS</li>
  <li>JavaScript</li>
</ul>

Consider Marker-Free Lists

Some browser and assistive technology combinations may not expose marker-free lists as expected. Test lists styled with list-style-type: none, particularly when used for navigation or important content.

Avoid Relying Only on Symbols

Decorative markers should not be the only indication of success, failure, or other important information.

Maintain Readability

Choose marker styles that remain clear at different text sizes and in different writing systems.

Important Consideration

CSS marker styles do not change the underlying ordered or unordered list semantics. Choose the correct HTML element before applying visual styles.

list-style-type Example

This example compares traditional bullet markers, decimal numbering, alphabetic numbering, Roman numerals, and a custom string marker.

HTML Example

<div class="list-type-demo">
  <div class="demo-item">
    <h3>Square Bullets</h3>
    <ul class="square-list">
      <li>HTML</li>
      <li>CSS</li>
      <li>JavaScript</li>
    </ul>
  </div>
  <div class="demo-item">
    <h3>Decimal Numbers</h3>
    <ol class="decimal-list">
      <li>HTML</li>
      <li>CSS</li>
      <li>JavaScript</li>
    </ol>
  </div>
  <div class="demo-item">
    <h3>Lowercase Letters</h3>
    <ol class="alpha-list">
      <li>HTML</li>
      <li>CSS</li>
      <li>JavaScript</li>
    </ol>
  </div>
  <div class="demo-item">
    <h3>Roman Numerals</h3>
    <ol class="roman-list">
      <li>HTML</li>
      <li>CSS</li>
      <li>JavaScript</li>
    </ol>
  </div>
  <div class="demo-item">
    <h3>Custom Checkmarks</h3>
    <ul class="check-list">
      <li>HTML</li>
      <li>CSS</li>
      <li>JavaScript</li>
    </ul>
  </div>
</div>

CSS Example

.list-type-demo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
}
.list-type-demo .demo-item {
  padding: 15px;
  border: 1px solid #cbd5e1;
  background-color: #f8fafc;
}
.list-type-demo h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}
.list-type-demo ul,
.list-type-demo ol {
  margin: 0;
  padding-left: 2rem;
}
.list-type-demo li {
  margin-bottom: 6px;
}
.list-type-demo .square-list {
  list-style-type: square;
}
.list-type-demo .decimal-list {
  list-style-type: decimal;
}
.list-type-demo .alpha-list {
  list-style-type: lower-alpha;
}
.list-type-demo .roman-list {
  list-style-type: upper-roman;
}
.list-type-demo .check-list {
  list-style-type: "✓ ";
}
Browser Result

Square Bullets

  • HTML
  • CSS
  • JavaScript

Decimal Numbers

  1. HTML
  2. CSS
  3. JavaScript

Lowercase Letters

  1. HTML
  2. CSS
  3. JavaScript

Roman Numerals

  1. HTML
  2. CSS
  3. JavaScript

Custom Checkmarks

  • HTML
  • CSS
  • JavaScript

Each list uses the same item text but displays a different marker style. The first four examples use predefined counter styles, while the last uses a fixed checkmark string.

Change the Numbering Style

.list-type-demo .decimal-list {
  list-style-type: decimal-leading-zero;
}

Change the Custom Marker

.list-type-demo .check-list {
  list-style-type: "★ ";
}

Remove the Markers

.list-type-demo .square-list {
  list-style-type: none;
}

These changes affect the visible marker without modifying the HTML list items.

Common Mistakes

Confusing Marker Type with Marker Position

list-style-type controls marker content. Use list-style-position to control whether markers appear inside or outside the content box.

Assuming none Removes Indentation

list-style-type: none removes the generated marker but does not automatically remove margins or padding.

Forgetting About Image Markers

An image specified with list-style-image can still appear when list-style-type is set to none.

Using a Fixed String for Sequential Numbering

A string marker displays the same text for every item. Use a counter style for automatically changing numbers or symbols.

Using CSS Numbering Instead of Correct HTML Semantics

Styling an unordered list with decimal markers does not change it into a semantic ordered list.

Overwriting the Marker Type with the Shorthand

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

The shorthand resets the marker type to disc.

Ignoring Inheritance

Nested lists may inherit a marker style unless a more specific declaration overrides it.

Assuming Every Counter Style Has Identical Support

Some language-specific and custom counter styles have different compatibility requirements.

Removing Markers Without Accessibility Testing

Some browser and assistive technology combinations may handle marker-free lists differently.

Using Symbols as the Only Status Indicator

Important information should appear in text rather than depending entirely on a marker symbol.

Important Considerations

Keep the following points in mind when using list-style-type:

  • The property controls the content of list item markers.
  • The initial value is disc.
  • The property is inherited.
  • It applies to list items.
  • It supports predefined counter style names.
  • Common unordered markers include disc, circle, and square.
  • Common ordered markers include decimal, alphabetic styles, and Roman numerals.
  • The decimal-leading-zero style adds leading zeros to small decimal values.
  • Language-specific numbering systems are available.
  • Support for individual counter styles can vary by browser.
  • Quoted strings can be used as fixed markers.
  • String markers do not automatically change between items.
  • The @counter-style rule defines reusable custom counter styles.
  • Custom counter styles can generate sequential symbols and numbers.
  • The none value suppresses the marker generated by this property.
  • Removing markers does not automatically remove list indentation.
  • Image markers can override the marker type when an image is available.
  • The marker type provides a fallback when an image cannot be displayed.
  • The list-style-position property controls marker placement.
  • The list-style shorthand can reset the marker type.
  • Different list items can use different marker styles.
  • Nested lists may inherit marker styles.
  • Browser default stylesheets influence ordinary HTML list markers.
  • The property also works with elements using display: list-item.
  • Changing marker appearance does not change HTML list semantics.
  • Use ordered lists when item order is meaningful.
  • Test marker-free lists with assistive technologies when appropriate.
  • Use readable marker styles that work at different text sizes.

Browser Support

The CSS list-style-type property is widely supported across modern browsers, including Chrome, Edge, Firefox, Safari, and Opera.

Traditional marker values such as disc, circle, square, decimal, and alphabetic or Roman numeral styles have long-established support. Compatibility for individual international counter styles, string markers, and custom @counter-style definitions may vary.

For current compatibility information, visit Can I Use? and search for list-style-type.

Specifications

The list-style-type property is defined in the CSS Lists and Counters Module Level 3 specification. Predefined and custom counter styles are also described in the CSS Counter Styles Module Level 3.

CSS Lists and Counters Module Level 3: list-style-type

CSS Counter Styles Level 3

For additional documentation and examples, consult MDN Web Docs.

MDN Web Docs: list-style-type