How to change the bullet color in HTML list (li) with CSS

2 Answers

0 votes
<!-- HTML -->

<ul>
   <li>HTML</li>
   <li>CSS</li>
   <li>JavaScript</li>
</ul>
/* CSS */

ul {
  list-style: none;
}

ul li::before {
  content : "\2022"; /*\2022 = bullet */
  padding-right: 12px;
  color: green; 
}

 



answered Feb 22, 2021 by avibootz
edited Feb 22, 2021 by avibootz
0 votes
<!-- HTML -->
 
<ul>
   <li>HTML</li>
   <li>CSS</li>
   <li>JavaScript</li>
</ul>
/* CSS */

ul {
  list-style: none;
}

ul li::before {
  content: "•"; 
  padding-right: 12px;
  color: red; 
}

 



answered Feb 22, 2021 by avibootz

Related questions

1 answer 282 views
1 answer 307 views
1 answer 283 views
3 answers 413 views
3 answers 402 views
1 answer 245 views
1 answer 276 views
...