1-minute answer
CSS represents any character as a backslash-escaped hex code point in the content property — for example content: "\00b0"; for °.
01 Step by step, per platform
A real, followable procedure for every platform — not a thin restatement of the shortcut.
Using content
- .icon::before { content: "\2192"; } inserts → before an element.
- The hex code is the Unicode code point, same one shown on any character reference page.
Direct UTF-8 characters
- You can also write the literal character directly in your CSS file if it's saved as UTF-8: content: "°"; works identically.
02 FAQ
Why is my \2192 showing as literal text instead of an arrow?
Check the property is content (not another property) and that it's inside a ::before or ::after pseudo-element — content only renders on generated content, not on regular elements.
Copied to clipboard