HTML Tutorial
HTML Forms
HTML Graphics
HTML Media
HTML API
HTML Emojis
Emojis are characters derived from the UTF-8 character set:
What are Emojis?
Emojis appear like images or icons, but in reality, they are not.
They are letters (characters) derived from the UTF-8 (Unicode) character set.
UTF-8 includes almost all of the characters and symbols in the world.
The HTML charset Attribute
Knowing the character set used in the page by the web browser helps in displaying the HTML page correctly.
This is specified in the <meta> tag:
<meta charset=”UTF-8″>
If it is not specified, UTF-8 is the default character set in HTML.
UTF-8 Characters
Most of the UTF-8 characters cannot be typed on a keyboard, but can be displayed using numbers and are called entity numbers:
A is 65
B is 66
C is 67
I will display A B C
I will display A B C
Output:
I will display A B C
I will display A B C
Example Explained
The <meta charset=”UTF-8″> element specifies the character set.
The characters A, B, and C are shown by the numbers 65, 66, and 67.
To let the browser understand the character displayed, start the entity number with &# and end it with ; (semicolon).
Emoji Characters
Emojis are a characters ย thatย are derived from the UTF-8 alphabet:
๐ is 128516
๐ is 128525
๐ is 128151
Example:
My First Emoji
😀
Output:
My First Emoji
😀
Since Emojis are characters, that can be copied, displayed, and sized just like any other character in HTML.
Example:
Sized Emojis
😀 😄 😍 💗
Output:
Sized Emojis
😀 😄 😍 💗