::marker
Quick Summary for ::marker
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.
Code Usage for ::marker
::marker { color: blue; font-size: 1.2em; }
More Details for ::marker
::marker
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.
::marker { color: blue; font-size: 1.2em; } Allowable properties
Only certain CSS properties can be used in a rule with ::marker as a selector:
white-space property color text-combine-upright, unicode-bidi and direction properties The content property All animation and transition properties Note: The specification states that additional CSS properties may be supported in future.
Syntax
::marker
Examples
HTML
<ul> <li>Peaches</li> <li>Apples</li> <li>Plums</li> </ul> CSS
ul li::marker { color: red; font-size: 1.5em; } Result
Specifications
| Specification |
|---|
| CSS Pseudo-Elements Module Level 4 # marker-pseudo |
See also
HTML elements that have marker boxes by default:<ol>, <li>, <summary> Select your preferred language English (US)DeutschEspañolFrançais日本語Русский中文 (简体) Change language
Posted in
12:22 am, February 22, 2022
Add Comment
Other Items in CSS
rgb()
rgba()
:right
right
@right-bottom
:root
rotate
rotate()
rotate3d()
rotateX()
rotateY()
rotateZ()
row-gap
ruby-align
ruby-position
saturate()
scale
scale()
scale3d()
scaleX()
scaleY()
scaleZ()
:scope
scroll-behavior
scroll-margin
scroll-margin-block
scroll-margin-block-end
scroll-margin-block-start
scroll-margin-bottom
scroll-margin-inline
scroll-margin-inline-end
scroll-margin-inline-start
scroll-margin-left
scroll-margin-right
scroll-margin-top
scroll-padding
scroll-padding-block
scroll-padding-block-end
scroll-padding-block-start
scroll-padding-bottom
scroll-padding-inline
scroll-padding-inline-end
scroll-padding-inline-start
scroll-padding-left
scroll-padding-right
scroll-padding-top
scroll-snap-align
scroll-snap-stop
scroll-snap-type
@scroll-timeline
