The ::marker CSS pseudo-element selects the marker box of a list item, which typically contains a bullet or number. It works on any element or pseudo-element set to display: list-item, such as the <li> and <summary> elements.
The ::marker CSS pseudo-element selects the marker box of a list item, which typically contains a bullet or number. It works on any element or pseudo-element set to display: list-item, such as the <li> and <summary> elements.
Only certain CSS properties can be used in a rule with ::marker as a selector:
white-space propertycolortext-combine-upright, unicode-bidi and direction propertiescontent propertyNote: The specification states that additional CSS properties may be supported in future.
::marker
<ul> <li>Peaches</li> <li>Apples</li> <li>Plums</li> </ul>
ul li::marker { color: red; font-size: 1.5em; }
| Specification |
|---|
| CSS Pseudo-Elements Module Level 4 # marker-pseudo |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
::marker |
86
80
|
86
80
|
68 |
No |
72
67
|
11.1
preview
|
86 |
86
80
|
68 |
61 |
11.3
|
14.0 |
animation_and_transition_support |
86
83
|
86
83
|
80 |
No |
72
69
|
No |
86 |
86
83
|
No |
61 |
No |
14.0 |