The ::marker pseudo-element selects the marker box of a list item — typically the bullet or number. It works on any element set to display: list-item, such as li inside ul or ol.
Only a limited set of properties applies (color, fonts, content, and a few others). For full box styling of custom bullets, many authors still use ::before with list-style: none.
Limited availability.
Not Baseline — support varies by browser and by property. color and font styles are the safest. content on ::marker is less consistent; test before relying on it.
Syntax
CSS Syntax
syntax.css
::marker{ /* styles */ }
Example: li::marker { color: crimson; }.
Values
Allowable Properties
::marker is not a value list — it accepts a short allowlist of CSS properties:
Use an ordered list. Numbers come from the list marker, not from your HTML text.
Style ol li::marker. Color and weight affect the numerals.
Keep semantics. Screen readers still hear a real numbered list.
Change type with list-style-type if you need letters or Roman numerals.
Edge Cases & Pitfalls
Most issues come from unsupported properties or hiding markers with list-style.
limited
Not Baseline
Support is uneven. Prefer color / fonts; treat content as progressive enhancement.
props
No box model on the marker
background, border, margin, and padding do not apply. Use ::before when you need a chip-like bullet.
list-style
list-style: none removes the marker
If you hide the marker, ::marker has nothing to style. That pattern is for ::before custom bullets instead.
vs before
::marker vs ::before
::marker keeps native list semantics simple. ::before is more powerful but more layout work.
Compatibility
Browser Support
::marker is a browser CSS pseudo-element. Node.js, Deno, and Bun do not apply it.
✓ Limited availability · Not Baseline
::marker
Modern Chromium, Firefox, and Safari support core styling (color/fonts) with varying coverage for content. Internet Explorer does not support ::marker.
85%Core styling
Google ChromeSupported
Core yes · content varies
Mozilla FirefoxSupported
Strong support
Apple SafariSupported
Core yes · content limited
Microsoft EdgeSupported
Core yes · content varies
OperaSupported
Core yes
Samsung InternetSupported
Core yes
Internet ExplorerNo
No support
::markerLimited · Varies by property
Bottom line: Safe for color and font marker tweaks. Test content; use ::before as a fallback when you need full box styling. This is not a JavaScript runtime API.
Remember
Key Takeaways
Role: style the list item marker box (bullet or number).
Allowlist: color, fonts, content, and a few text helpers — not the full box model.
Limited availability: enhance markers; fall back to ::before when needed.
One line:::marker paints the bullet or number — keep lists semantic, style lightly, and don’t expect a full box.
Frequently Asked Questions
It selects the marker box of a list item — usually the bullet or number — so you can style that marker without changing the item text.
Any element or pseudo-element with display: list-item, such as li in ul/ol lists. summary can also have a marker in some contexts.
A limited set: color, content, font properties, white-space, quotes, some counter and direction properties, plus animation and transition properties. Background, margin, and border are not supported.
::marker styles the browser list marker. ::before inserts custom content before the item text, supports more properties, and usually needs list-style: none plus layout tweaks.
No. MDN lists Limited availability — some parts (especially content) vary by browser. Prefer color and font styles for the widest support; test content carefully.
No. It is a browser CSS pseudo-element, not a Node.js feature.