Skip to main content

HTML Emojis

To use emojis in HTML, you can use Unicode characters or HTML entities.

  • Unicode characters: You can insert an emoji directly using its Unicode value. For example, the Unicode value for the smiley face emoji is U+1F600. To insert this emoji in your HTML document.

    You can use the following code:

😀
  • HTML entities: You can also use HTML entities to display emojis in your HTML document. For example, the HTML entity for the smiley face emoji is 😀(😀).

    You can use the following code:

😀
info

You can find the Unicode values and HTML entities for different emojis on Unicode.org or Emojipedia.org.

HTML charset Attribute

The charset attribute in HTML specifies the character encoding of the document.

It is used in the meta tag in the head section of an HTML document to define the character encoding of the document. To specify that the document is encoded in UTF-8.

you can use the following code in the head section of your HTML document:

<meta charset="UTF-8" />

The charset attribute is important because it tells the browser how to interpret the characters in the HTML document. If the character encoding is not specified or is specified incorrectly, the browser may display the text incorrectly or not at all.

UTF-8 Characters

UTF-8 (Unicode Transformation Format 8-bit) is a character encoding that can represent any character in the Unicode standard, which includes a wide range of characters from different languages and scripts.

Characters are represented by a variable number of 8-bit bytes. The first 128 characters (Unicode code points 0 to 127) are represented by a single byte, which is the same as the ASCII character set.

Some examples of UTF-8 characters include:

  • a is represented by the byte 0x61
  • b is represented by the byte 0x62
  • c is represented by the byte 0x63
  • d is represented by the byte 0x64

Characters in the ASCII range (0 to 127) are represented by a single byte that is the same as their ASCII code. Therefore, the characters a to d are represented by a single byte each in UTF-8.

Emoji Characters

Editor

Loading...

Few Emoji Symbols in UTF-8

EmojiUnicode Code PointDecimal Value
😃U+1F603&#128515;
🌸U+1F338&#127800;
🍕U+1F355&#127829;
🎉U+1F389&#127881;
🐶U+1F436&#128054;
🚀U+1F680&#128640;
🌊U+1F30A&#127754;
🎧U+1F3A7&#127911;
📷U+1F4F7&#128247;
🍔U+1F354&#127828;