Change the color of a bullet in a html list?

I managed this without adding markup, but instead using li:before. This obviously has all the limitations of :before (no old IE support), but it seems to work with IE8, Firefox and Chrome after some very limited testing. It's working in our controller environment, wondering if anyone could check this. The bullet style is also limited by what's in unicode.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
  <style type="text/css">
    li {
      list-style: none;

    li:before {
      /* For a round bullet */
      /* For a square bullet */
      display: block;
      position: relative;
      max-width: 0px;
      max-height: 0px;
      left: -10px;
      top: -0px;
      color: green;
      font-size: 20px;


The bullet gets its color from the text. So if you want to have a different color bullet than text in your list you'll have to add some markup.

Wrap the list text in a span:

  <li><span>item #1</span></li>
  <li><span>item #2</span></li>
  <li><span>item #3</span></li>

Then modify your style rules slightly:

li {
  color: red; /* bullet color */
li span {
  color: black; /* text color */