::marker
::marker styles the bullet point or number marker of list items. It accepts limited properties: color, font, content, and unicode-bidi.
::marker styles the bullet point or number marker of list items. It accepts limited properties: color, font, content, and unicode-bidi.
/* Custom bullet color */
li::marker {
color: #007bff;
font-size: 1.2em;
}
/* Emoji bullets */
ul li::marker {
content: "✓ ";
}
/* Custom counter style */
ol li::marker {
color: #6f42c1;
font-weight: bold;
}
::marker is simpler than using ::before with list-style: none for custom bullet styling.