::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
Most people can do absolutely awe-inspiring things,” he said. “Sometimes they just need a little nudge.
Unknown
Random CSS Property

print-color-adjust

The print-color-adjust CSS property sets what, if anything, the user agent may do to optimize the appearance of the element on the output device. By default, the browser is allowed to make any adjustments to the element's appearance it determines to be necessary and prudent given the type and capabilities of the output device.
color-adjust css reference