HTML Emojis

Learn how to add emoji characters to your HTML pages

Quick Answer

How do you add emojis to HTML?

Add emojis to HTML by copying and pasting them directly into your code, using HTML entity codes (like &#128512; for ๐Ÿ˜€), or using Unicode codes. Ensure your HTML file uses UTF-8 character encoding (<meta charset="UTF-8">) for proper emoji display across all browsers.

Emojis are characters from the UTF-8 character set. They look like images or icons, but they are not - they are letters (characters) from the UTF-8 (Unicode) character set.

What are Emojis?

Emojis are graphical symbols that represent emotions, objects, or concepts. They are part of the Unicode Standard and can be displayed in HTML like any other character.

๐Ÿ˜€ Key Facts About Emojis

  • Emojis are characters from the UTF-8 character set
  • They are not images - they are text characters
  • Different devices may display emojis differently
  • Your HTML document must use UTF-8 charset to display emojis

The HTML charset Attribute

To display an HTML page correctly, a web browser must know which character set to use. This is specified in the <meta> tag:

Example - UTF-8 Charset

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

<p>I will display ๐Ÿ˜€</p>

</body>
</html
>

Result:

I will display ๐Ÿ˜€

Important: If the charset is not specified, emojis might not display correctly.

How to Use Emojis in HTML

You can add emojis to HTML in three ways:

Method 1: Copy and Paste

The easiest way is to copy an emoji from an emoji source and paste it into your HTML:

Example - Direct Emoji

<p>Hello ๐Ÿ‘‹ Welcome! ๐ŸŽ‰</p>

Method 2: Use Decimal HTML Entity

Each emoji has a Unicode decimal value that can be used as an HTML entity:

Example - Decimal Entity

<p>I will display &#128512;</p>

Result:

I will display ๐Ÿ˜€

Method 3: Use Hexadecimal HTML Entity

You can also use the hexadecimal Unicode value:

Example - Hexadecimal Entity

<p>I will display &#x1F600;</p>

Result:

I will display ๐Ÿ˜€

Emoji Size

Emojis are text characters, so you can change their size using CSS font-size property:

Example - Different Sizes

<p style="font-size: 20px;">Small emoji: ๐Ÿ˜€</p>
<p style="font-size: 40px;">Medium emoji: ๐Ÿ˜€</p>
<p style="font-size: 60px;">Large emoji: ๐Ÿ˜€</p>

Result:

Small emoji: ๐Ÿ˜€

Medium emoji: ๐Ÿ˜€

Large emoji: ๐Ÿ˜€

Smiley Face Emojis

Emoji Description Decimal Hex
๐Ÿ˜€ Grinning Face &#128512; &#x1F600;
๐Ÿ˜ƒ Grinning Face with Big Eyes &#128515; &#x1F603;
๐Ÿ˜„ Grinning Face with Smiling Eyes &#128516; &#x1F604;
๐Ÿ˜ Beaming Face with Smiling Eyes &#128513; &#x1F601;
๐Ÿ˜‚ Face with Tears of Joy &#128514; &#x1F602;
๐Ÿ˜Š Smiling Face with Smiling Eyes &#128522; &#x1F60A;
๐Ÿ˜ Smiling Face with Heart-Eyes &#128525; &#x1F60D;
๐Ÿ˜Ž Smiling Face with Sunglasses &#128526; &#x1F60E;
๐Ÿ˜ข Crying Face &#128546; &#x1F622;
๐Ÿ˜ญ Loudly Crying Face &#128557; &#x1F62D;

Hand Gesture Emojis

Emoji Description Decimal Hex
๐Ÿ‘ Thumbs Up &#128077; &#x1F44D;
๐Ÿ‘Ž Thumbs Down &#128078; &#x1F44E;
๐Ÿ‘ Clapping Hands &#128079; &#x1F44F;
๐Ÿ‘‹ Waving Hand &#128075; &#x1F44B;
๐Ÿค Handshake &#129309; &#x1F91D;
โœŒ๏ธ Victory Hand &#9996; &#x270C;

Heart Emojis

Emoji Description Decimal Hex
โค๏ธ Red Heart &#10084; &#x2764;
๐Ÿ’™ Blue Heart &#128153; &#x1F499;
๐Ÿ’š Green Heart &#128154; &#x1F49A;
๐Ÿ’› Yellow Heart &#128155; &#x1F49B;
๐Ÿ’œ Purple Heart &#128156; &#x1F49C;
๐Ÿ’” Broken Heart &#128148; &#x1F494;

Object Emojis

Emoji Description Decimal Hex
โญ Star &#11088; &#x2B50;
๐ŸŽ‰ Party Popper &#127881; &#x1F389;
๐ŸŽ Wrapped Gift &#127873; &#x1F381;
๐Ÿ”ฅ Fire &#128293; &#x1F525;
๐Ÿ’ก Light Bulb &#128161; &#x1F4A1;
๐Ÿš€ Rocket &#128640; &#x1F680;

Practical Examples

Example - Welcome Message

<h1>Welcome to our website! ๐Ÿ‘‹</h1>
<p>We're excited to have you here! ๐ŸŽ‰</p>

Example - Feature List

<ul>
  <li>๐Ÿš€ Fast performance</li>
  <li>๐Ÿ’ก Smart features</li>
  <li>๐Ÿ”ฅ Hot deals</li>
  <li>โญ Premium quality</li>
</ul>

Example - Social Media Links

<p>Follow us:</p>
<p
  >
  <a href="#">๐Ÿ“˜ Facebook</a> |
  <a
    href="#"
    >๐Ÿฆ Twitter</a
  > |
  <a href="#">๐Ÿ“ท Instagram</a>
</p
>

Example - Rating System

<p>Customer Rating: โญโญโญโญโญ (5 stars)</p>
<p>Product Quality: ๐Ÿ‘๐Ÿ‘</p>

Emoji Accessibility

When using emojis, consider accessibility for users with screen readers:

Example - Emoji with ARIA Label

<span role="img" aria-label="thumbs up">๐Ÿ‘</span>

โ™ฟ Accessibility Tips

  • Use role="img" to indicate the emoji is an image
  • Add aria-label to describe the emoji's meaning
  • Don't rely on emojis alone to convey important information
  • Provide text alternatives when possible
  • Consider that screen readers read emoji descriptions, which may be verbose

Browser support and standards

Browser rendering and modern HTML conformance are different questions. Check the current element reference for the browsers and features your project needs; the older source version table is not a current compatibility guarantee.

Read the MDN element reference

Emoji Best Practices

โœ“ Tips for Using Emojis

  • Always set charset="UTF-8" in your HTML
  • Use emojis sparingly - too many can be overwhelming
  • Ensure emojis are culturally appropriate for your audience
  • Use emojis to enhance, not replace, text content
  • Consider accessibility when using emojis
  • Test emoji appearance across different devices
  • Use CSS font-size to control emoji size
  • Be aware that emoji meanings can vary across cultures

Test Your Knowledge

5 practice questions are available. Choose Start practice to try them.