
- CSS Tutorial
- CSS - Home
- CSS - Introduction
- CSS - Syntax
- CSS - Inclusion
- CSS - Measurement Units
- CSS - Colors
- CSS - Backgrounds
- CSS - Fonts
- CSS - Text
- CSS - Images
- CSS - Links
- CSS - Tables
- CSS - Borders
- CSS - Margins
- CSS - Lists
- CSS - Padding
- CSS - Cursors
- CSS - Outlines
- CSS - Dimension
- CSS - Scrollbars
- CSS Advanced
- CSS - Visibility
- CSS - Positioning
- CSS - Layers
- CSS - Pseudo Classes
- CSS - Pseudo Elements
- CSS - @ Rules
- CSS - Text Effects
- CSS - Media Types
- CSS - Paged Media
- CSS - Aural Media
- CSS - Printing
- CSS - Layouts
- CSS - Validations
- CSS3 Tutorial
- CSS3 - Tutorial
- CSS3 - Rounded Corner
- CSS3 - Border Images
- CSS3 - Multi Background
- CSS3 - Color
- CSS3 - Gradients
- CSS3 - Shadow
- CSS3 - Text
- CSS3 - Web font
- CSS3 - 2d transform
- CSS3 - 3d transform
- CSS3 - Animation
- CSS3 - Multi columns
- CSS3 - User Interface
- CSS3 - Box Sizing
- CSS Responsive
- CSS - Responsive Web Design
- CSS References
- CSS - Questions and Answers
- CSS - Quick Guide
- CSS - References
- CSS - Color References
- CSS - Web browser References
- CSS - Web safe fonts
- CSS - Units
- CSS - Animation
- CSS Resources
- CSS - Useful Resources
- CSS - Discussion
How to change bullet colors for lists with CSS?
To change bullet colors for lists with CSS, the code is as follows −
Example
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> body{ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } ul { list-style: none; } ul li{ font-size: 20px; font-weight: 500; } ul li::before { content: "\2022"; color: rgb(86, 18, 117); font-weight: bold; display: inline-block; width: 1em; margin-left: -1em; } </style> </head> <body> <h1>Change Bullet Color of List Example</h1> <ul> <li>Camel</li> <li>Goat</li> <li>Giraffe</li> <li>Lion</li> </ul> </body> </html>
Output
The above code will produce the following output −
- Related Articles
- Change Bullet Color for Lists with ::marker CSS Selector
- Set image for bullet style with CSS
- Styling Lists with CSS
- How to change colors of a Drawable in Android?
- Style unordered lists markers with CSS
- How to Change Placeholder Color for Textboxes in CSS
- How to change background images on scroll with CSS?
- How to Animate Bullets in Lists using CSS
- How to create density plot for categories filled with different colors in R?
- How to change the color of active links with CSS
- How to change the color of focused links with CSS
- How to change tabs on hover with CSS and JavaScript?
- How to change the background and foreground colors of tab in Java?
- Convert the colors of the object to 256 shades of gray with CSS
- Set marker inside of the box containing the bullet points with CSS

Advertisements