HTML Entities, Symbols, and Emojis

1. HTML Entities

HTML entities are used to display characters that are reserved in HTML, ensuring they appear correctly in the browser. They are also used for characters that cannot be typed directly in HTML.

Why Use HTML Entities?

  • To display reserved characters like <, >, and &.
  • To show non-keyboard characters like ©, ®, and .

Structure of an HTML Entity:

  • Begins with & and ends with ;.
  • Example: &lt; represents <.

Common HTML Entities:

  • &lt; : < (less than)
  • &gt; : > (greater than)
  • &amp; : & (ampersand)
  • &quot; : " (double quote)
  • &apos; : ' (apostrophe)

Example Usage:

<p>Use &lt; and &gt; for angle brackets in HTML.</p>

Try It Now

This will display as:

Use < and > for angle brackets in HTML.

2. HTML Symbols

HTML symbols are characters or icons that are not found on a standard keyboard. These symbols can represent various objects, currencies, or concepts.

Common HTML Symbols:

  • &copy; : © (copyright)
  • &reg; : ® (registered trademark)
  • &euro; : € (Euro sign)
  • &pound; : £ (Pound sign)
  • &yen; : ¥ (Yen sign)

Example Usage:

<p>&copy; 2025 YourCompany. All rights reserved.</p>

Try It Now

This will display as:

© 2025 YourCompany. All rights reserved.

3. HTML Emojis

Emojis are graphical symbols used to convey emotions, objects, or ideas. They are widely supported in modern browsers and can be included in HTML using Unicode or direct input.

How to Use Emojis in HTML:

  • Use Unicode values for emojis, usually represented in HTML as &#X; where X is the Unicode number.

Common Emojis:

  • &#128512; : 😀 (grinning face)
  • &#128153; : 💙 (blue heart)
  • &#128077; : 👍 (thumbs up)
  • &#127881; : 🎉 (party popper)
  • &#127774; : 🌞 (sun)

Example Usage:

<p>Welcome to our website! &#128512;</p>
<p>We hope you have a great day! &#127774;</p>

Try It Now

This will display as:

Welcome to our website! 😀
We hope you have a great day! 🌞

Practical Examples

Using HTML Entities, Symbols, and Emojis Together

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>HTML Entities, Symbols, and Emojis</title>
</head>
<body>
  <h1>HTML Entities</h1>
  <p>Use &lt;strong&gt; for bold text in HTML.</p>

  <h1>HTML Symbols</h1>
  <p>Currency Symbols: Euro &euro;, Pound &pound;, Yen &yen;.</p>

  <h1>HTML Emojis</h1>
  <p>Celebrate with us! &#127881; &#128515;</p>
</body>
</html>

Try It Now

Result:

  • HTML Entities: “Use <strong> for bold text in HTML.”
  • HTML Symbols: “Currency Symbols: Euro €, Pound £, Yen ¥.”
  • HTML Emojis: “Celebrate with us! 🎉 😃”

 

Conclusion

HTML entities, symbols, and emojis help in displaying a wide range of characters and expressions that enhance the readability and visual appeal of your web pages. They ensure that reserved characters are properly rendered and allow for creative and dynamic content through symbols and emojis.

By mastering these elements, you can:

  • Safely include special characters in your HTML content.
  • Enrich your web pages with symbols and emojis to better engage users.