CSS list-style-type Property

Beginner
6 min read
Updated: Oct 2026
3 examples
Live preview

Definition and Usage

The list-style-type property sets the marker of a list item — a bullet, number, letter, Roman numeral, custom string, or no marker.

It applies to elements with display: list-item (including <li>). The CSS initial value is disc. It is inherited. Pair it with list-style-position and list-style-image, or use the list-style shorthand.

Baseline · Widely available.

Common markers (disc, decimal, none, and so on) are not deprecated. Some regional counter styles and string markers have uneven support.

Accessibility.

In Safari, list-style-type: none can remove list semantics. Add role="list" on the <ul>/<ol> if it should still be announced as a list.

CSS Syntax

syntax.css
list-style-type: <counter-style> | <string> | none | initial | inherit;

Everyday keywords include disc, circle, square, decimal, lower-roman, upper-alpha, and none.

Property Values

ValueDescriptionTry it
discFilled circle. Common default for <ul>Try it
circleHollow circleTry it
squareFilled squareTry it
decimalNumbers starting at 1. Common default for <ol>Try it
upper-alphaUppercase letters: A, B, C…Try it
lower-romanLowercase Roman numerals: i, ii, iii…Try it
noneNo marker. Common for navigation listsTry it

You can also use a string (for example "-"), initial, inherit, and many regional counter styles. See MDN for the full set.

How to Use list-style-type

Set the marker on the list (or on each li).

  1. Choose a list: <ul> for bullets or <ol> for numbers.
  2. On the list, set list-style-type to the marker you want.
  3. Use none for menus, then style spacing yourself if needed.
  4. For nested lists, set list-style-type: inherit on the inner list if it should match the parent.
GoalTypical value
Classic bulletsdisc / circle / square
Numbered stepsdecimal or upper-alpha
Nav / custom UI listnone

Live Preview

The same three items. Change list-style-type and watch the markers update.

Works on both <ul> and <ol>. The marker follows currentColor.

List
  • Apollo
  • Hubble
  • Cassini

list-style-type: disc

CSS Examples

Each snippet shows only the list and list-style-type. Use Try It Yourself for a live editor.

Example 1 — Disc Bullets

Use filled circles on an unordered list.

CSS
<style>
  ul {
    list-style-type: disc;
  }
</style>

<ul>
  <li>Apollo</li>
  <li>Hubble</li>
  <li>Cassini</li>
</ul>
Try It Yourself

How It Works

  1. Target the list. The rule is set on ul, so every li gets the marker.
  2. Choose the marker. disc draws a filled circle.
  3. Color follows text. The marker uses the list item’s currentColor.
  4. Swap freely. Try circle or square the same way.

Example 2 — Upper Alpha

Letter markers on an ordered list.

CSS
<style>
  ol {
    list-style-type: upper-alpha;
  }
</style>

<ol>
  <li>Plan</li>
  <li>Build</li>
  <li>Ship</li>
</ol>
Try It Yourself

How It Works

  1. Start with <ol>. Ordered lists are meant for sequences.
  2. Override the default. Browsers usually use decimal; this switches to A, B, C.
  3. Same idea for Roman. Use lower-roman or upper-roman for i / I style markers.
  4. Semantics stay. The HTML is still an ordered list; only the marker look changes.

Example 3 — No Markers

Hide markers for a navigation-style list.

CSS
<style>
  ul {
    list-style-type: none;
  }
</style>

<ul role="list">
  <li>Home</li>
  <li>Docs</li>
  <li>Blog</li>
</ul>
Try It Yourself

How It Works

  1. Remove the marker. none hides bullets and numbers.
  2. Keep list semantics. role="list" helps Safari still expose a list to assistive tech.
  3. Style spacing next. You may also reset padding/margin for a flat nav look.
  4. Shorthand option. list-style: none clears type, position, and image together.

Edge Cases & Pitfalls

Most surprises come from inheritance, Safari, or nested lists.

nested

Nested lists reset to UA defaults

Browsers style nested ul/ol again. Use list-style-type: inherit on the nested list to keep the parent marker.

a11y

none can drop list semantics in Safari

Add role="list" when you hide markers but still want a list in the accessibility tree.

image

Image can hide the type

If list-style-image is set, that image is used instead of the type marker when it loads.

display

Needs list-item display

Markers appear on list items. Changing an item to display: block removes the marker behavior.

support

Some styles need fonts / newer browsers

Regional counter styles and string markers may not look right everywhere. Stick to common keywords for cross-browser UI.

Browser Support

list-style-type is a browser CSS property for list markers. Node.js, Deno, and Bun do not apply it.

✓ Baseline · Widely available

list-style-type

Common marker keywords are supported in all modern browsers. Some regional styles and string values vary by browser and fonts.

98% Common markers
Google Chrome 1+
Full support
Mozilla Firefox 1+
Full support
Apple Safari 1+
Full support
Microsoft Edge 12+
Full support
Opera 7+
Full support
Samsung Internet 1+
Full support
Internet Explorer 4+
Full support
list-style-type Widely supported

Bottom line: Safe for everyday disc, decimal, alpha, roman, and none. Test specialty counter styles if you need them. It is not a runtime API.

Key Takeaways

  • Role: choose the list item marker look.
  • Defaults: disc for many uls, decimal for many ols.
  • Menus: use none, and consider role="list" in Safari.
  • Nested lists: set inherit if children should keep the parent marker.

One line: list-style-type picks the marker — bullets, numbers, letters, or none.

Frequently Asked Questions

It sets the marker for a list item — for example a disc, circle, square, number, letter, Roman numeral, custom string, or none.
The CSS initial value is disc. User-agent styles usually set unordered lists to disc and ordered lists to decimal.
Use list-style-type: none. In Safari, also add role="list" on the list if assistive tech should still treat it as a list.
Yes. Nested lists may still show browser defaults unless you set list-style-type: inherit on the nested ul or ol.
list-style-type sets only the marker kind. list-style is the shorthand for type, position, and image.
Common values are Baseline and widely available. Some regional counter styles and string markers have uneven support. It is a browser CSS property, not a Node.js feature.

Next: margin

Learn how to set outer spacing on all four sides of an element.

margin tutorial →

CODETOFUN NEWS

Stay Ahead in Tech

Get the latest IT news, programming updates, and technology trends directly on your phone.

Your daily dose of tech, straight to your feed.

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful