To type a character that's not on your keyboard, you need its unicode codepoint in decimal or hexadecimal. In the examples below, HH means two hexadecimal digits, DD means two decimal digits, HHHH is four hexadecimal digits, and so on. DD+ means two or more decimal digits, HH+ means two or more hexadecimal digits.
HTMLTo type out unicode characters in HTML, use one of the following:
Ɖ == Ɖ Ɖ == Ɖ ‡ == ‡
CSSTo print out a unicode character using CSS content, use the following:
== \2021(Note: the CSS example that I've used here only works in browsers that support the
:beforepseudo class and the
contentrule, but in general you can use unicode characters anywhere in CSS.)
URLURL context is different from HTML context, so I'm including it here.
To print a unicode character into a URL, you need to represent it in UTF-8, using the %HH notation for each byte.
encodeURIComponentfunctions to do this for you.
End notesUse escape sequences only in two cases.
- Your editor or keyboard doesn't allow you to type the characters in directly.
- The characters could be misinterpreted as syntax, eg < or > in HTML.