Emoji in HTML: Characters, Codes and Setup That Works

The fastest way to put an emoji in HTML is to paste the character into your file, save it as UTF-8, and declare <meta charset="utf-8"> in the <head>. If you can’t trust the pipeline your file travels through, write the emoji as a numeric reference instead: 😎 for 😎 or ✅ for ✅. This guide covers both methods, the codes, the names, styling, accessibility and the reasons an emoji sometimes shows up as a box or a question mark.
TL;DR
- Paste the emoji directly and add
<meta charset="utf-8">. It works in every modern editor and browser. - Use decimal (
😎) or hex (😎) references when a CMS, email tool or old system mangles raw characters. - HTML has no friendly named entities for emoji. The official names live in the Unicode emoji list, not in HTML.
- Emoji look different per platform, so test on more than one device.
- If an emoji carries meaning, add a visible text label and hide the symbol from screen readers.
Table of Contents
- Method 1: paste the emoji as a character
- Method 2: decimal and hexadecimal references
- Emoji names: where the official list lives
- Sequences: skin tones, flags and joined emoji
- Why the same emoji looks different everywhere
- Styling emoji with CSS
- Accessibility: don’t make screen readers chatter
- When emoji break: a quick checklist
- Perspective: pick the method by who edits the file
- Find, check and copy emoji faster
- A reusable pattern for real pages
- FAQ
- Sources
Method 1: paste the emoji as a character
Emoji are characters, like letters. With UTF-8 you can paste them into modern editors, and the browser renders them with a system or fallback emoji font, according to SitePoint’s guide to emoji in HTML. That means no image files and no icon library.
Here is a complete page:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Launch day 🚀</title>
</head>
<body>
<h1>Welcome 😎</h1>
<p>Task finished ✅</p>
</body>
</html>
Three details matter:
- Declare UTF-8 in the head. The web.dev documentation on document structure says to set the encoding with
<meta charset="utf-8" />, and notes that declaring UTF-8 lets you include emoji even in the title. - Save the file as UTF-8. The declaration only tells the browser what to expect. If your editor saves in another encoding, the bytes won’t match. Most editors show the encoding in the status bar.
- Put the meta tag early. Keep it near the top of the
<head>, before the title, so the browser knows the encoding before it reads any emoji.
If you also serve the page over HTTP, make sure the server’s Content-Type header doesn’t announce a different charset. A header that disagrees with your meta tag is a common cause of garbled symbols.
How to get the emoji to paste
You have a few options:
- Your operating system’s picker. SitePoint lists Ctrl+Cmd+Space on macOS and Win + . on Windows.
- Chrome and other browsers use the same system picker inside text fields. There is no separate Chrome shortcut, so use the OS one while your cursor is in the editor or an input.
- A searchable library. Browse by theme, click, and the emoji is on your clipboard. Our emoji library at Emoji Trove has more than 1,900 emoji with one-click copy, which helps when you don’t know what an emoji is called.
Method 2: decimal and hexadecimal references
A numeric character reference writes the emoji as its Unicode code point. The two forms are:
- Decimal:
&#+ the code point in base 10 +; - Hexadecimal:
&#x+ the code point in base 16 +;
SitePoint notes that references can help where raw emoji might get garbled. The trade-off is readability: 😎 tells you nothing when you scan the source, while 😎 is obvious at a glance.
Codes for ✅ and 😎
The two emoji readers ask about most:
| Emoji | Unicode name | Code point | Decimal | Hex |
|---|---|---|---|---|
| 😎 | Smiling Face with Sunglasses | U+1F60E | 😎 |
😎 |
| ✅ | White Heavy Check Mark | U+2705 | ✅ |
✅ |
The 😎 values match the W3Schools emoji faces reference, which lists decimal 128526 and hex 1F60E. For ✅, the Compart entry for U+2705 gives the same code point and its HTML entities.
You can convert any code point yourself. Take the hex value after “U+”, and put &#x in front and ; after it. For decimal, convert the hex number to base 10. A browser console does it in one line: parseInt('1F60E', 16) returns 128526.
Use in markup
<p>Cool: 😎 or 😎</p>
<p>Done: ✅ or ✅</p>
Both lines in each pair render identically to pasting the character.
Do named entities exist for emoji?
Not in a practical way. HTML’s named references such as & and © cover classic symbols, not the emoji set. For emoji, choose between the raw character and the numeric reference. The “official name” you may be looking for, like “smiling face with sunglasses”, is a Unicode and CLDR name, not an HTML entity.
Emoji names: where the official list lives
The reference most developers rely on is the Unicode Consortium’s Full Emoji List. It gives each emoji and sequence with its CLDR name, keywords and vendor images side by side. That last part is useful for seeing how one emoji differs between platforms.
Two things to know when you use it:
- The page is versioned (the one we checked is v18.0). New versions add emoji, so always note which version you’re reading. Our page on Emoji 16.0 shows what that release added if you need to check older-device support.
- The Full Emoji List does not list emoji with skin tones. Unicode publishes a separate Full Skin Tone List for those.
When you write code, use the Unicode name as a comment. It makes 😎 readable for the next person:
<!-- U+1F60E smiling face with sunglasses -->
<span>😎</span>
Sequences: skin tones, flags and joined emoji
Some emoji aren’t a single code point. A skin-tone variant is a base emoji followed by a modifier. A family or profession emoji can join several emoji with an invisible joiner. Raw pasting keeps these intact, because your editor inserts the whole sequence.
If you use numeric references, you must write every code point of the sequence in order. Miss one and the browser shows the pieces separately, such as a person next to a colored square. For anything beyond a single code point, pasting the character is safer. Our guide to emoji combinations that render across devices shows which sequences behave well and which fall apart on older systems.

Why the same emoji looks different everywhere
Browsers draw emoji with whichever emoji font the system or fallback provides, so appearance varies by platform, as SitePoint explains. An emoji that looks like a glossy sticker on one phone may look flatter on a desktop. Design for that: don’t write copy that depends on a specific facial expression, and don’t build a layout that assumes an exact glyph width.
Text or color presentation
Some characters can appear as plain black text symbols or as colored emoji. Chrome 131 added support for the CSS property font-variant-emoji, which controls colored versus monochrome glyphs. The Chrome 131 release notes also note that the variation selectors U+FE0E and U+FE0F can select text and emoji presentation.
<span>✅︎</span> <!-- text style where supported -->
<span>✅️</span> <!-- emoji style -->
In CSS:
.status-icon { font-variant-emoji: emoji; }
The Chrome 145 beta post adds a detail for Forced Colors Mode: emoji whose font-variant-emoji value computes to normal or unicode render with monochrome glyphs when available. If your site supports high-contrast users, expect your emoji to lose color there.
Styling emoji with CSS
Because an emoji is text, ordinary text properties apply. Per SitePoint, you can change font-size, and you can transform or animate an emoji once it is display: inline-block.
<span class="big-emoji">😎</span>
.big-emoji {
font-size: 3rem;
display: inline-block;
transition: transform 0.2s;
}
.big-emoji:hover { transform: rotate(10deg) scale(1.1); }
CSS color generally won’t recolor a full-color emoji, since the glyph carries its own colors. If you need exact control of color, size and consistent look on every device, an SVG icon is the better tool, and emoji are the better tool when you want zero extra files.
Accessibility: don’t make screen readers chatter
A screen reader may read an emoji’s full name aloud, which gets noisy when you use several in a row. The W3C’s guidance on a Unicode character with an on-screen text alternative says that when a character conveys information, you should provide a visible text alternative, and that aria-hidden="true" can prevent inaccurate announcements of the character.
In practice:
<!-- Decorative: hide it -->
<h2><span aria-hidden="true">🚀</span> Launch checklist</h2>
<!-- Meaningful: keep a visible label -->
<p><span aria-hidden="true">✅</span> Payment received</p>
The rule of thumb: the sentence should still make sense with every emoji deleted. If “✅” is the only sign that a task is done, add the word “Done” next to it.
When emoji break: a quick checklist
If you see a box, a diamond with a question mark, or strings like 😎, work through this list:
- Is the meta charset present? It should read
utf-8and sit in the head. - Was the file saved as UTF-8? Re-save it with the right encoding.
- Does the server send a conflicting header? Check the
Content-Typeresponse in your browser’s network panel. - Does a CMS, database or email tool strip characters? Some older systems mangle raw emoji. Switch to numeric references, the case SitePoint flags.
- Is the emoji too new for the device? An emoji from a recent Unicode version shows as a box on a system without a font for it. Check the version before relying on it.
Perspective: pick the method by who edits the file
We run a library of more than 1,900 emoji, so we see the same pattern in what people copy and where they paste it. Most trouble comes from the environment, not the emoji. A static page you control in a UTF-8 editor should simply contain the characters, because readable source is easier to maintain. A page that passes through a legacy CMS, a template engine or an email builder is where we’d reach for numeric references.
We also think the biggest mistake is treating emoji as universal. The Unicode list shows the same emoji drawn differently by each vendor, and newer emoji take time to reach older devices. So we recommend choosing common, long-established emoji for anything important, and keeping the meaning in words. Check the meaning first too: an emoji that reads as friendly in one place can read as sarcastic in another, which is why we publish meanings next to every copy button.
— Nkosi
Find, check and copy emoji faster
If you’re building a page and need the right emoji now, our searchable emoji library lets you search by name or browse by theme, copy with one click, and read the meaning and Unicode data before you commit. You can start with themed collections such as the love emoji list with Unicode names, or open a single entry like 🍕 pizza to see its meaning and copy it.
A reusable pattern for real pages
Here is a small snippet that combines the practices above: UTF-8, a decorative emoji hidden from assistive tech, a meaningful one with a label, and a size rule.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Release notes 🚀</title>
<style>
.emoji { font-size: 1.25em; display: inline-block; }
</style>
</head>
<body>
<h1><span class="emoji" aria-hidden="true">🚀</span> Release notes</h1>
<ul>
<li><span class="emoji" aria-hidden="true">✅</span> Fixed: login error</li>
<li><span class="emoji" aria-hidden="true">😎</span> New: dark theme</li>
</ul>
</body>
</html>
Notice that each emoji is wrapped in a <span>. That gives you a hook for CSS, a place for aria-hidden, and a clear boundary in the markup. For JavaScript-built pages, the same rule applies: put the character in a string and the browser handles it, provided the page itself is UTF-8.
FAQ
What is the code for the ✅ emoji in HTML?
The ✅ emoji is U+2705, “White Heavy Check Mark”. Write it as ✅ in decimal or ✅ in hex, or paste the character directly. Add a text label if the check mark is the only signal that something is complete.
What is the code for the 😎 emoji?
It is U+1F60E, “Smiling Face with Sunglasses”. Use 😎 (decimal) or 😎 (hex) in your HTML. Both render the same as pasting 😎 into a UTF-8 file.
Where can I find a list of official emoji names?
Use the Unicode Consortium’s Full Emoji List, which shows each emoji’s CLDR name, keywords and images from several vendors. Skin-tone variants are in a separate Full Skin Tone List. HTML itself doesn’t define emoji names.
How do I write emoji in Chrome?
Chrome relies on your operating system’s picker. On Windows press Win + . and on macOS press Ctrl+Cmd+Space while your cursor is in a text field. Then paste into your HTML editor and keep UTF-8 declared.
Should I use characters or numeric references?
Use raw characters when your files stay in a UTF-8 workflow, because the source stays readable. Use numeric references when a system in the chain garbles raw emoji. Either way the browser draws the same glyph.
Sources
- Emojis in HTML | SitePoint
- Document structure | web.dev
- HTML Emoji Faces | W3Schools
- U+2705 White Heavy Check Mark | Compart
- Full Emoji List | Unicode
- Chrome 131 release notes | Chrome for Developers
- Chrome 145 beta | Chrome for Developers
- Unicode Character with an On-Screen Text Alternative | W3C WAI