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.

Emojis in HTML
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-

using HTML emoji directly

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-

HTML UTF 8

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-

HTML emojis character

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-

HTML Emojis styled using CSS

Following is a list of some HTML Emoji Symbols-

CharDecHexName
๐Ÿ˜€1285121F600Grinning Face
๐Ÿ˜1285131F601Grinning Face With Smiling Eyes
๐Ÿ˜‚1285141F602Face With Tears Of Joy
๐Ÿ˜ƒ1285151F603Smiling Face With Open Mouth
๐Ÿ˜„1285161F604Smiling Face With Open Mouth And Smiling Eyes
๐Ÿ˜…1285171F605Smiling Face With Open Mouth And Cold Sweat
๐Ÿ˜†1285181F606Smiling Face With Open Mouth And Tightly-Closed Eyes
๐Ÿ˜‡1285191F607Smiling Face with Halo
๐Ÿ˜ˆ1285201F608Smiling Face With Horns
๐Ÿ˜‰1285211F609Winking Face
๐Ÿ˜Š1285221F60ASmiling Face With Smiling Eyes
๐Ÿ˜‹1285231F60BFace Savouring Delicious Food
๐Ÿ˜Œ1285241F60CRelieved Face
๐Ÿ˜1285251F60DSmiling Face With Heart-Shaped Eyes
๐Ÿ˜Ž1285261F60ESmiling Face With Sunglasses
๐Ÿ˜1285271F60FSmirking Face
๐Ÿ˜1285281F610Neutral Face
๐Ÿ˜‘1285291F611Expressionless Face
๐Ÿ˜’1285301F612Unamused Face
๐Ÿ˜“1285311F613Face With Cold Sweat
๐Ÿ˜”1285321F614Pensive Face
๐Ÿ˜•1285331F615Confused Face
๐Ÿ˜–1285341F616Confounded Face
๐Ÿ˜—1285351F617Kissing Face
๐Ÿ˜˜1285361F618Face Throwing A Kiss
๐Ÿ˜™1285371F619Kissing Face With Smiling Eyes
๐Ÿ˜š1285381F61AKissing Face With Closed Eyes
๐Ÿ˜›1285391F61BFace With Stuck-Out Tongue
๐Ÿ˜œ1285401F61CFace With Stuck-Out Tongue And Winking Eye
๐Ÿ˜1285411F61DFace With Stuck-Out Tongue And Tightly-Closed Eyes
๐Ÿ˜ž1285421F61EDisappointed Face
๐Ÿ˜Ÿ1285431F61FWorried Face
๐Ÿ˜ 1285441F620Angry Face
๐Ÿ˜ก1285451F621Pouting Face
๐Ÿ˜ข1285461F622Crying Face
๐Ÿ˜ฃ1285471F623Persevering Face
๐Ÿ˜ค1285481F624Face With Look Of Triumph
๐Ÿ˜ฅ1285491F625Disappointed But Relieved Face
๐Ÿ˜ฆ1285501F626Frowning Face With Open Mouth
๐Ÿ˜ง1285511F627Anguished Face
๐Ÿ˜จ1285521F628Fearful Face
๐Ÿ˜ฉ1285531F629Weary Face
๐Ÿ˜ช1285541F62ASleepy Face
๐Ÿ˜ซ1285551F62BTired Face
๐Ÿ˜ฌ1285561F62CGrimacing Face
๐Ÿ˜ญ1285571F62DLoudly Crying Face
๐Ÿ˜ฎ1285581F62EFace With Open Mouth
๐Ÿ˜ฏ1285591F62FHushed Face
๐Ÿ˜ฐ1285601F630Face With Open Mouth And Cold Sweat
๐Ÿ˜ฑ1285611F631Face Screaming In Fear
๐Ÿ˜ฒ1285621F632Astonished Face
๐Ÿ˜ณ1285631F633Flushed Face
๐Ÿ˜ด1285641F634Sleeping Face
๐Ÿ˜ต1285651F635Dizzy Face
๐Ÿ˜ถ1285661F636Face Without Mouth
๐Ÿ˜ท1285671F637Face With Medical Mask
๐Ÿ™1285771F641
๐Ÿ™‚1285781F642
๐Ÿ™ƒ1285791F643
๐Ÿ™„1285801F644
๐Ÿค1292961F910
๐Ÿค‘1292971F911
๐Ÿค’1292981F912
๐Ÿค“1292991F913
๐Ÿค”1293001F914
๐Ÿค•1293011F915
๐Ÿค 1293121F920
๐Ÿคก1293131F921
๐Ÿคข1293141F922
๐Ÿคฃ1293151F923
๐Ÿคค1293161F924
๐Ÿคฅ1293171F925
๐Ÿคง1293191F927
๐Ÿคจ1293201F928
๐Ÿคฉ1293211F929
๐Ÿคช1293221F92A
๐Ÿคซ1293231F92B
๐Ÿคฌ1293241F92C
๐Ÿคญ1293251F92D
๐Ÿคฎ1293261F92E
๐Ÿคฏ1293271F92F
๐Ÿง1294881F9D0

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.

Your 15 seconds will encourage us to work even harder
Please share your happy experience on Google

courses

DataFlair Team

The DataFlair Team is passionate about delivering top-notch tutorials and resources on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. With expertise in the tech industry, we simplify complex topics to help learners excel. Stay updated with our latest insights.

1 Response

  1. Zimmie says:

    “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 #&.”

    This is incorrect. It should be &#.

Leave a Reply

Your email address will not be published. Required fields are marked *