HTML Emoji

Emoji are characters from the UTF-8 character set: 😄 😍 💗.

Emoji (English: emoji, Japanese: 絵textCharacter/えもじ emoji) are ideographic symbols used in web pages and chat. They were originally visual emotion symbols (pictographs) used in wireless communication in Japan. "Expression" refers to facial expressions, while "icon" means graphic symbols. They can be used to represent various expressions, such as a smiley face for laughter, a cake for food, and so on. Emoji look like a picture or an icon, but in fact they are not.

Emoji are actually characters in the UTF-8 (Unicode) character set.

UTF-8 covers almost all characters and symbols in the world.

HTML charset Attribute

To display an HTML page correctly, the browser needs to know the character set used by the web page. The character set in a web page is specified using the<meta>tag:
<meta charset="UTF-8">

Note:If we don't explicitly specify the meta attribute, the default character set encoding is also UTF-8.

For more UTF-8 encoding, refer to:HTML Unicode (UTF-8) Reference Manual

UTF-8 Characters

Many UTF-8 characters cannot be typed on the keyboard, but we can use numbers (called entity numbers) to represent them:

  • A is 65
  • B is 66
  • C is 67

Examples

<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> </head> <body> <p>Display result: A B C</p> <p>Display result: &#65; &#66; &#67;</p> </body> </html>

Try it Yourself »

Example Analysis:

<meta charset="UTF-8">Defines the character set.

A, B, and C can also be represented using 65, 66, and 67.

Entity numbers need to start with&#and end with a semicolon;to correctly display a character.

Similarly, Emoji are also characters and can be used in HTML pages just like any other character:

Examples

<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> </head> <body> <h1>Emoji Tag Symbols</h1> <p>You can use the font-size property to set the size of emoji, just like setting the font size.</p> <p style="font-size:48px"> &#165EA6; &#165EA6; &#165EA6; &#175EA6; </p> </body> </html>

Try it Yourself »

Emoji Symbols

The table below lists some Emoji symbols:

Emoji Value
🗻&#0957A6;
🗼&#0A58A6;
🗽&#0B58A6;
🗾&#145DA6;
🗿&#155DA6;
😀&#165EA6;
😁&#165EA6;
😂&#165EA6;
😃&#165EA6;
😄&#165EA6;
😅&#165EA6;

For more Emoji content, refer to:Emoji Reference Manual

Other Extensions