Loading lessons...
HTML Emojis
HTML Emojis
Emojis are pictures made of characters! You can type them right into your HTML, or use character codes.
Just paste the emoji!
Modern HTML uses UTF-8, so you can type emojis directly:
<p>I love pizza! 😋 </p>
Wait, that used a code. Here's typing it directly:
<p>I love coding! 😄</p>
Using character codes
Some emojis are easier to write as a code. Each emoji has a number, and you write it as &#<number>;.
<p>😀</p> <!-- 😀 grinning face -->
<p>😁</p> <!-- 😁 grinning face with smiling eyes -->
<p>😂</p> <!-- 😂 face with tears of joy -->
<p>😅</p> <!-- 😅 smiling face with open mouth and cold sweat -->
<p>😊</p> <!-- 😊 smiling face with smiling eyes -->
Popular emojis and their codes
💗 ❤️ red heart
💙 💙 blue heart
💜 💜 purple heart
😍 😍 smiling face with heart-eyes
😎 😎 smiling face with sunglasses
🙄 🙄 face with rolling eyes
🎉 🎉 party popper
🌸 🌸 cherry blossom
🍕 🍕 pizza
👍 👍 thumbs up
Make sure your page uses UTF-8
For emojis to work, include the charset meta:
<meta charset="UTF-8">
TL;DR
- Emojis are characters; UTF-8 lets them work.
- Type emojis directly, or use
&#number;codes. 😀is a smiling face,💗is a heart.- Always set
<meta charset="UTF-8">. - Don't overuse them: a sprinkle is better than a flood!