Site icon DataFlair

HTML Emojis โ€“ Emoji Characters in HTML

Full Stack Web Development Courses with Real-time projects Start Now!!

Emojis are digital icons or characters used to express specific feelings or emotions. They have become the medium of subtle communication in the past decade, and thus, HTML5 has new features of including them on our websites. HTML Emojis are not merely images but characters from the UTF-8(Unicode) character set.

It can therefore be stipulated that the incorporation of emojis in the communication systems has revolutionized both conventional and modern day communication systems. They add some other dimensions of communication that plain text does not contain. Thus, emojis used in web pages can add an element of reality and interaction to the feel of the web developers. This uses a sign language that is recognized by everyone; therefore, it can be used to improve communication in cultures and languages.

Also, correct HTML character encoding will make all Emojis to display proficiently on various browsers and devices. This is why the strokes should be consistent in order to keep the tone and meaning of the content as was intended. It was established that developers need to know the right numeral representations and direct specifications in order not to face any problems with the display of emojis.


The first prerequisite of displaying emojis is to add the character set of the HTML document. This is defined in the meta tag of the head.

<meta charset="UTF-8">

UTF-8 is the default character set of HTML and covers all the characters and symbols.

There are two ways of specifying emojis in an HTML document-

1. Direct Specification in HTML

Emojis can be directly copied and pasted in an HTML document.
You can use https://emojipedia.org/ to get emojis.

<!DOCTYPE html>
<html>
<head>
  <title>Emojis</title>
  <style>
    div{
      height: 150px;
      width: 100px;
      border-style: solid; 
    }
  </style>
</head>
<body>
  <div>
<p id="emoji" style="font-size: 40px;">๐Ÿˆ</p>
  </div>
</body>
</html>

Output-

2. Numerical Representation of UTF-8 Character in HTML

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>A B and C</p>
</body>
</html>

Output-

The codes for A, B, and C are 65, 66, and 67. Here the browsers understand these codes with the entity and renders it correctly.

HTML Emoji Characters

Emojis can also be displayed using the UTF-8 charset. For example,
๐Ÿ˜ is 128525
๐Ÿ’— is 128151
๐Ÿ˜„ is 128516

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<h1>My Emoji</h1>
<p>๐Ÿ˜€</p>
</body>
</html>

Output-

As we know, emojis are characters. Let us try to style them using CSS.

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<h1>Emojis</h1>
<p style="font-size:48px">
 ๐Ÿ˜„ ๐Ÿ’— ๐Ÿ˜€  ๐Ÿ˜
</p>
</body>

Output-

Following is a list of some HTML Emoji Symbols-

Char Dec Hex Name
๐Ÿ˜€ 128512 1F600 Grinning Face
๐Ÿ˜ 128513 1F601 Grinning Face With Smiling Eyes
๐Ÿ˜‚ 128514 1F602 Face With Tears Of Joy
๐Ÿ˜ƒ 128515 1F603 Smiling Face With Open Mouth
๐Ÿ˜„ 128516 1F604 Smiling Face With Open Mouth And Smiling Eyes
๐Ÿ˜… 128517 1F605 Smiling Face With Open Mouth And Cold Sweat
๐Ÿ˜† 128518 1F606 Smiling Face With Open Mouth And Tightly-Closed Eyes
๐Ÿ˜‡ 128519 1F607 Smiling Face with Halo
๐Ÿ˜ˆ 128520 1F608 Smiling Face With Horns
๐Ÿ˜‰ 128521 1F609 Winking Face
๐Ÿ˜Š 128522 1F60A Smiling Face With Smiling Eyes
๐Ÿ˜‹ 128523 1F60B Face Savouring Delicious Food
๐Ÿ˜Œ 128524 1F60C Relieved Face
๐Ÿ˜ 128525 1F60D Smiling Face With Heart-Shaped Eyes
๐Ÿ˜Ž 128526 1F60E Smiling Face With Sunglasses
๐Ÿ˜ 128527 1F60F Smirking Face
๐Ÿ˜ 128528 1F610 Neutral Face
๐Ÿ˜‘ 128529 1F611 Expressionless Face
๐Ÿ˜’ 128530 1F612 Unamused Face
๐Ÿ˜“ 128531 1F613 Face With Cold Sweat
๐Ÿ˜” 128532 1F614 Pensive Face
๐Ÿ˜• 128533 1F615 Confused Face
๐Ÿ˜– 128534 1F616 Confounded Face
๐Ÿ˜— 128535 1F617 Kissing Face
๐Ÿ˜˜ 128536 1F618 Face Throwing A Kiss
๐Ÿ˜™ 128537 1F619 Kissing Face With Smiling Eyes
๐Ÿ˜š 128538 1F61A Kissing Face With Closed Eyes
๐Ÿ˜› 128539 1F61B Face With Stuck-Out Tongue
๐Ÿ˜œ 128540 1F61C Face With Stuck-Out Tongue And Winking Eye
๐Ÿ˜ 128541 1F61D Face With Stuck-Out Tongue And Tightly-Closed Eyes
๐Ÿ˜ž 128542 1F61E Disappointed Face
๐Ÿ˜Ÿ 128543 1F61F Worried Face
๐Ÿ˜  128544 1F620 Angry Face
๐Ÿ˜ก 128545 1F621 Pouting Face
๐Ÿ˜ข 128546 1F622 Crying Face
๐Ÿ˜ฃ 128547 1F623 Persevering Face
๐Ÿ˜ค 128548 1F624 Face With Look Of Triumph
๐Ÿ˜ฅ 128549 1F625 Disappointed But Relieved Face
๐Ÿ˜ฆ 128550 1F626 Frowning Face With Open Mouth
๐Ÿ˜ง 128551 1F627 Anguished Face
๐Ÿ˜จ 128552 1F628 Fearful Face
๐Ÿ˜ฉ 128553 1F629 Weary Face
๐Ÿ˜ช 128554 1F62A Sleepy Face
๐Ÿ˜ซ 128555 1F62B Tired Face
๐Ÿ˜ฌ 128556 1F62C Grimacing Face
๐Ÿ˜ญ 128557 1F62D Loudly Crying Face
๐Ÿ˜ฎ 128558 1F62E Face With Open Mouth
๐Ÿ˜ฏ 128559 1F62F Hushed Face
๐Ÿ˜ฐ 128560 1F630 Face With Open Mouth And Cold Sweat
๐Ÿ˜ฑ 128561 1F631 Face Screaming In Fear
๐Ÿ˜ฒ 128562 1F632 Astonished Face
๐Ÿ˜ณ 128563 1F633 Flushed Face
๐Ÿ˜ด 128564 1F634 Sleeping Face
๐Ÿ˜ต 128565 1F635 Dizzy Face
๐Ÿ˜ถ 128566 1F636 Face Without Mouth
๐Ÿ˜ท 128567 1F637 Face With Medical Mask
๐Ÿ™ 128577 1F641
๐Ÿ™‚ 128578 1F642
๐Ÿ™ƒ 128579 1F643
๐Ÿ™„ 128580 1F644
๐Ÿค 129296 1F910
๐Ÿค‘ 129297 1F911
๐Ÿค’ 129298 1F912
๐Ÿค“ 129299 1F913
๐Ÿค” 129300 1F914
๐Ÿค• 129301 1F915
๐Ÿค  129312 1F920
๐Ÿคก 129313 1F921
๐Ÿคข 129314 1F922
๐Ÿคฃ 129315 1F923
๐Ÿคค 129316 1F924
๐Ÿคฅ 129317 1F925
๐Ÿคง 129319 1F927
๐Ÿคจ 129320 1F928
๐Ÿคฉ 129321 1F929
๐Ÿคช 129322 1F92A
๐Ÿคซ 129323 1F92B
๐Ÿคฌ 129324 1F92C
๐Ÿคญ 129325 1F92D
๐Ÿคฎ 129326 1F92E
๐Ÿคฏ 129327 1F92F
๐Ÿง 129488 1F9D0

Summary

Emojis have become a prevailing mode of communication in recent times, so incorporating them into our web-page has become important. HTML 5, along with its UTF-8 charset, is used to display emojis in an HTML web-page. In this article, weโ€™ve discussed the ways of inserting emojis and looked at some common codes for them. Emojis can be inserted in two ways, by directly copy-pasting and using the numerical representation of UTF-8 charset.

Exit mobile version