HTML Character Entities References in CSS Content Property Values

Created 2010 June 3. Modified 2010 June 13.

Say the following ruleset is wanted:
li.toupee:after {content: " »";}

This won’t always work but the following ruleset will:
li.toupee:after {content: " \00BB";}

So, how to get from » to \00BB:

  1. Find the Character Entity Reference (W3C) wanted
  2. Find a code starting U+ in the entity description, for example U+00BB for » (raquo)
  3. Copy the number part of the code, 00BB
  4. Paste the number into your CSS Content property value
  5. Place a "\" before the number, \00BB
  6. Done

More info can be found by reading the Strings section of Syntax and Basic Data Types (W3C).