HTML Emojis
Emojis are nothing but characters that look like icons or images.
The character set UTF-8 covers almost all the characters and symbols available in the world, which include several emojis.
In order to use emojis in an HTML document, the character set UTF-8 must be defined within the <head>
section of the HTML using <meta>
elements as shown below.
<head>
<meta charset="UTF-8">
</head>
Then, emojis can be included in HTML markup using their decimal or hexadecimal value as shown below.
<p>Smiling face with sunglasses using decimal value 😎</p>
<p>Smiling face with sunglasses using hexadecimal value 😎</p>
Refer to the below article for more details on the HTML character set.
Reference
Refer to the below link for a list of all the emojis available for the UTF-8 character set.
Example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<h1>HTML Emojis</h1>
<p>Smiling face with sunglasses using decimal value 😎</p>
<p>Smiling face with sunglasses using hexadecimal value 😎</p>
</body>
</html>
Overall
Adding HTML Emojis to web page content makes it more interesting.