list-style-type
Example
ul {
list-style: none;
}
li::before {
content: "– ";
}ul {
list-style-type: "– ";
}A string value replaces the bullet while keeping the native marker box, its alignment and list semantics.
Common mistakes
- Rebuilding bullets with
::beforeand losing alignment of wrapped lines.
Key points
- Custom bullet text uses a string value or
::marker, not::beforecontent on top of a hidden marker. - Ordered lists keep
<ol>in HTML, while the type only changes how numbers look. - Custom systems are defined with
@counter-styleand used by name.
Interview questions
How do I use letters instead of numbers in a list?
Use 'lower-alpha' or 'upper-alpha' on the list, or Roman numerals with 'lower-roman' or 'upper-roman'.
Can I use an emoji as a list bullet?
Yes. Use a string value like list-style-type: "✅ " or set content on ::marker.