What are Emojis?
Emojis look like images, but they are not.
Emojis are letters (characters) from the UTF-8 (Unicode) character set:
๐ ๐ ๐
UTF-8 covers almost all of the characters and symbols in the world.
| Emoji | Value | |
|---|---|---|
| ๐ป | ๐ป | |
| ๐ผ | ๐ผ | |
| ๐ฝ | ๐ฝ | |
| ๐พ | ๐พ | |
| ๐ฟ | ๐ฟ | |
| ๐ | ๐ | |
| ๐ | ๐ | |
| ๐ | ๐ | |
| ๐ | ๐ | |
| ๐ | ๐ | |
| ๐ | ๐ |
HTML Emojis Examples
- Smileys โ ๐ ๐ ๐ ๐ ๐
- Hands โ โ โ โ โ ๐
- People โ ๐ฎ ๐ง ๐ฆ ๐ ๐คด
- Office โ ๐ ๐ป ๐ ๐ ๐
- Places โ โบ ๐ ๐ฝ ๐ฟ ๐ข
- Transport โ ๐ ๐ ๐ข ๐ ๐
- Animals โ ๐ด ๐ ๐ ๐ป ๐
- Food โ โ ๐ญ ๐ ๐ฉ ๐ฃ
- Plants โ ๐ด ๐ณ ๐ผ ๐ ๐ฅ
- Fruits โ ๐ ๐ ๐ ๐ฅ ๐ฅฅ
- Sports โ โฝ ๐ ๐คฟ ๐ โณ
- Earth & Sky โ ๐ ๐ ๐ ๐ ๐
- Weather โ โ โ ๐ ๐ โ
- Clothing โ ๐ ๐ ๐ฉ ๐ ๐
- Audio/Video โ ๐ฅ ๐ต ๐น ๐ ๐บ
- Celebration โ ๐ ๐ ๐ ๐ ๐
- Entertainment โ ๐จ ๐ช ๐ญ ๐ก ๐ข
- Symbols โ ๐ก ๐ฐ ๐ ๐ ๐
The HTML charset Attribute
To display an HTML page correctly, a web browser must know the character set used in the page.
This is specified in the <meta> tag:
<meta charset="UTF-8">
If not specified, UTF-8 is the default character set in HTML.
UTF-8 Characters
Many UTF-8 characters cannot be typed on a keyboard, but they can always be displayed using numbers (called entity numbers):
- A is 65
- B is 66
- C is 67
Example
<!DOCTYPE html>
<html>
<meta charset="UTF-8">
<body>
<p>I will display A B C</p>
<p>I will display A B C</p>
</body>
</html>
Example Explained
The <meta charset="UTF-8"> element defines the character set.
The characters A, B, and C, are displayed by the numbers 65, 66, and 67.
To let the browser understand that you are displaying a character, you must start the entity number with &# and end it with ; (semicolon).
Emoji Characters
Emojis are also characters from the UTF-8 alphabet:
- ๐ is 128516
- ๐ is 128525
- ๐ is 128151
Example
<!DOCTYPE html>
<html>
<meta charset="UTF-8">
<body>
<h1>My First Emoji</h1>
<p>😀</p>
</body>
</html>
Since Emojis are characters, they can be copied, displayed, and sized just like any other character in HTML.
Example
<!DOCTYPE html>
<html>
<meta charset="UTF-8">
<body>
<h1>Sized Emojis</h1>
<p style="font-size:48px">
😀 😄 😍 💗
</p>
</body>
</html>