css li bullet color code example

Example 1: how to change only bullet color in css

li::before {content: "•"; color: red;
  display: inline-block; width: 1em;
  margin-left: -1em}

Example 2: change color of bullet points css

li::marker {
	color: red;
}
/* ^ just set the color of the marker pseudo element */

Example 3: how to change only bullet color in css

li::before {content: counter(li); color: red;
  display: inline-block; width: 1em;
  margin-left: -1em}

Example 4: change bullet color css list

ul {
  list-style: none; /* Remove default bullets */
}

ul li::before {
  
  content: "\2022";  /* Add content: \2022 is the CSS Code/unicode for a 
  bullet */
  color: red; /* Change the color */
  font-weight: 
  bold; /* If you want it to be bold */
  display: inline-block; /* 
  Needed to add space between the bullet and the text */ 
  width: 1em; 
  /* Also needed for space (tweak if needed) */
  margin-left: -1em; /* 
  Also needed for space (tweak if needed) */
}

Tags:

Misc Example