Symbols that are not present on your keyboard can also be added by using entities.

HTML symbols are characters that have a special meaning in HTML and can be used to represent a variety of things such asmathematical symbols,currency signs,arrows,and more.

They are represented using special codes called character entities, which are similar to HTML entities.

Here are some examples of HTML symbols:

  • ©represents the copyright symbol.
  • ®represents the registered trademark symbol.
  • represents the trademark symbol.
  • represents the Euro currency sign.
  • $represents the Dollar currency sign.
  • £represents the Pound currency sign.

To use an HTML symbol, simply use the corresponding character entity in your HTML code. For example, to display the Euro currency sign in your HTML document, you can use the entity:

<p>The price is 10<strong>&euro;</strong></p>

This will be displayed in the browser as:

The price is 10€

HTML Symbol Entities

You can use these symbols in your HTML code by including the entity name or number within an appropriate HTML element, such as a paragraph or a heading.

For example, to display the copyright symbol, you could use the following code:

Example

<!DOCTYPE HTML>
  <html>
    <head>
      <meta charset="UTF-8">
      <link rel="stylesheet"  href="style.css"/>
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <title>Title of the Document</title>
    </head>
    <body>
    <footer>
        <p>&copy; 2023 My Company</p>
        <p>For more information, please contact us at info&amp;mycompany.com</p>
    </footer>
    </body>
</html>

This would display as: © 2023 My Company

Similarly, to display the ampersand symbol, you could use the as we did in the second paragraph above:

It would display as: For more information, please contact us at info@mycompany.com

HTML symbols can be especially useful for displaying special characters that are not available on a standard keyboard, or for displaying special characters that may not be supported by all fonts. let see how to use Emojis in the next chapter.