CSS Reference ยท Lists, Tables and Generated Content
The list-style-type property
Reference for the CSS list-style-type property: every common marker keyword, custom strings and counter styles, with a live comparison of the main values.
The list-style-type property chooses what kind of marker appears before each list item: a bullet shape, a number, letters, Roman numerals or text of your own. The default is disc for unordered lists and decimal for ordered lists (the browser's style sheet sets those).
ol { list-style-type: lower-roman; } ul { list-style-type: "โ "; }
Try it
Syntax
list-style-type: <counter-style> | <string> | none;
| Initial value | disc |
| Applies to | List items |
| Inherited | Yes |
| Animatable | No |
| Computed value | As specified |
Values
| Value | Description |
|---|---|
disc, circle, square |
Filled bullet, hollow bullet, filled square. |
decimal |
1, 2, 3, ... |
decimal-leading-zero |
01, 02, 03, ... |
lower-alpha, upper-alpha |
a, b, c / A, B, C (lower-latin and upper-latin are aliases). |
lower-roman, upper-roman |
i, ii, iii / I, II, III. |
lower-greek |
ฮฑ, ฮฒ, ฮณ, ... |
disclosure-open, disclosure-closed |
The triangles used for <details>; their direction follows the writing mode. |
<string> |
Any text, such as "โ ". Include a trailing space yourself. |
<custom-ident> |
The name of a style defined with @counter-style. |
none |
No marker. |
Many other named systems exist for other scripts (for example Armenian, Georgian, Hebrew and CJK numerals).
Usage notes
- Only list items have markers. The property matters for elements with
display: list-item, which includes<li>; set it on the list and the items inherit it. - Numbers keep counting. Marker values come from the list's built-in
list-itemcounter, sostart,reversedandvalueattributes in HTML still apply. - Letters after Z. Alphabetic systems continue
aa,ab, ... Numeric systems such aslower-romanfall back todecimalfor numbers they cannot represent (very large values). - Customize more with
::marker. The::markerpseudo-element changes color, size and font of the marker. - Screen readers. Numbers in ordered lists are conveyed by the list structure; do not fake numbering with strings in a
<ul>if the order matters.
Browser support
All the keyword values above work in current browsers. <string> values and disclosure-* are newer; check a compatibility table for older browsers.
Related
list-styleโ shorthand@counter-styleโ custom marker systems::marker- Lessons: Styling lists, CSS counters