HTML Emojis

Learn how to add emoji characters to your HTML pages

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 and Device Support

📱 Important Notes

  • Emojis look different on different devices and browsers
  • Apple, Google, Microsoft, and Samsung each have their own emoji designs
  • Older browsers may not support all emojis
  • Some emojis may display as black and white symbols on unsupported platforms
  • Always test your emojis on multiple devices

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