At least two kinds of special characters exist in HTML:
Entities
characters which do not appear on all keyboards; or
characters that would interfere with HTML code such as
<
and>
Emoji
- icons that no longer consist of image files but text-like characters
Entities
There are two ways to encode entities:
< <!-- "less than" - encoding by "name" -->
< <!-- "less than" - encoding by "#number" -->
Common entities include:
Appearance | Meaning | By name | By #number |
non-breaking space | |   | |
< | less than | < | < |
\> | greater than | > | > |
& | ampersand | & | & |
¢ | cent | ¢ | ¢ |
€ | euro | € | € |
£ | pound | £ | £ |
¥ | copyright | © | © |
® | registered trademark | ® | ® |
™ | trademark | ™ | ™ |
Remember that HTML entities "by name" are case sensitive, so €
will work but not &Euro;
!
Emoji
Emoji are just symbols like $ or % and we can simply input them using
an emoji keyboard (
Fn + E
on a Mac)an HTML entity code (such as
😄
for 😁)
We also need to ensure that the <head>
tag contains the following in order for the emoji to appear on the page:
...
<head>
...
<meta charset="UTF-8">
...
</head>
...
One final word: the plural of emoji is "emoji" (as in Japanese) and its semblance to "emotion" was a complete coincidence!