::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:

All font properties The 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

No Items Found.

Add Comment
Type in a Nick Name here
 
Other Categories in CSS
css
Search CSS
Search CSS by entering your search text above.
Welcome

This is my test area for webdev. I keep a collection of code here, mostly for my reference. Also if i find a good link, i usually add it here and then forget about it. more...

Subscribe to weekly updates about things i have added to the site or thought interesting during the last week.

You could also follow me on twitter or not... does anyone even use twitter anymore?

If you found something useful or like my work, you can buy me a coffee here. Mmm Coffee. ☕

❤️👩‍💻🎮

🪦 2000 - 16 Oct 2022 - Boots
Random Quote
A.A. Milne’s Winnie-the-Pooh: “If you live to be a hundred, I want to live to be a hundred minus one day so I never have to live without you.”
A.A. Milne
Random CSS Property

transition-duration

The transition-duration CSS property sets the length of time a transition animation should take to complete. By default, the value is 0s, meaning that no animation will occur.
transition-duration css reference