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:
- Find the Character Entity Reference (W3C) wanted
- Find a code starting U+ in the entity description, for example U+00BB for » (raquo)
- Copy the number part of the code, 00BB
- Paste the number into your CSS Content property value
- Place a "\" before the number, \00BB
- Done
More info can be found by reading the Strings section of Syntax and Basic Data Types (W3C).