Emojis


Emojis

Emojis are letters (characters) from the Unicode character set UTF-8 (Unicode). In HTML, the character set is defined via the meta charset=" UTF-8′′> element. Although many UTF-8 characters are impossible to enter on a keyboard, they may always be shown using numbers (called entity numbers). You must start the entity number with &, #, and end it with ';' to let the browser know you're showing a character (semicolon).

Note:

  • Emoji can be shown on a webpage using a hexadecimal (hex) reference instead of a decimal (dec) reference. In addition to the grammar mentioned above, the hexadecimal reference must be preceded by an 'x'.
  • Emojis are characters, which means they may be copied, displayed, and resized precisely like any other HTML character.

Example No.1:

<html> <head> <meta charset="UTF-8"> </head> <body> <h1>Knowledge2life</h1> <p>&#128512;</p> </body> </html>

OUTPUT:

Knowledge2life

😀

Example No.2:

<html> <head> <meta charset="UTF-8"> </head> <body> <h1>Knowledge2life</h1> <p style="font-size:48px"> &#128512; &#128516; &#128525; &#128151; </p> </body> </html>

OUTPUT:

Knowledge2life

😀 😄 😍 💗