How do I write an emoji in HTML?

In: Emojis for Developers

Three ways — all equivalent:

  1. Paste the emoji directly into your HTML: <p>🎉</p>
  2. Use a decimal numeric entity: &#127881;
  3. Use a hex numeric entity: &#x1F389;

Always set <meta charset="utf-8"> in the <head> so the browser decodes them correctly.

Read about How do I write an emoji in HTML? in