HTML Emojis

Emoji are digital symbols or characters used to express specific feelings or emotions.

HTML emojis are not just images, they are characters in the UTF-8 (Unicode) character set. Emoji’sย first appeared in 1997 on Japanese mobile phones.


The HTML charset Attribute

If we want to display emojis on an HTML page, we must specify the character set inside the HTML documentโ€™s head

<meta charset="UTF-8">

UTF-8 covers almost all of the characters and symbols in the world.


UTF-8 Characters

In the UTF-8 character set A is 65, B is 66, C is 67, and so on. These characters are displayed like entities, starting with #&.
Here is an example of displaying characters of UTF-8 charset.

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<p>Display A B and C</p>
<p>Display &#65; &#66; &#67;</p>
</body>
</html>

Output

Display A B and C

Display A B C


Emoji Characters

We can display UTF-8 characters in a webpage using numbers known as entity numbers.ย . Emojis are also characters from the UTF-8 alphabet:

  • ๐Ÿ˜„ is 128516
  • ๐Ÿ˜ is 128525
  • ๐Ÿ’— is 128151

Example

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>

<h1>Smile Emoji</h1>

<p>&#128512;</p>

</body>
</html>

Output


Some Emoji Symbols in UTF-8

EmojiValue
๐Ÿ—ป&#128507;
๐Ÿ—ผ&#128508;
๐Ÿ—ฝ&#128509;
๐Ÿ—พ&#128510;
๐Ÿ—ฟ&#128511;
๐Ÿ˜€&#128512;
๐Ÿ˜&#128513;
๐Ÿ˜‚&#128514;
๐Ÿ˜ƒ&#128515;
๐Ÿ˜„&#128516;
๐Ÿ˜…&#128517;
๐Ÿค•&#x1F915;
๐Ÿ˜ˆ&#x1F608;
๐Ÿ‘ป&#x1F47B;
๐Ÿ‘ฝ&#x1F47D;
๐Ÿ™ˆ&#x1F648;
๐Ÿ™‰&#x1F649;
๐Ÿ™Š&#x1F64A;