cover-img

HTML Entities: Displaying Special Characters and Symbols

6 June, 2023

2

2

1

Sometimes we like to display special characters on our web pages. For example, characters like copyright symbol (©), trademark symbol (™), or currency symbols ($, €). When you copy these symbols from the web or document and paste in your editor, they might not be rendered correctly because of encoding issues. And symbols like the lesser than sign (<), the greater than sign (>) and quotes (”) can be confused with HTML syntax.

To display such characters correctly, we use HTML entities. They are simply special codes in HTML reserved for displaying various such special characters.

Using HTML entities

To use HTML entities, you must replace the special character in your editor with its corresponding entity code. For example, the entity code for the less-than symbol (<) is &lt;, and the entity code for the greater-than symbol (>) is &gt;. By using these entity codes instead of the actual characters, you can include them in your HTML markup without causing any issues. Let's see a few more examples:

<p>&copy; Copyrights 2023. All rights reserved. &trade;</p>

Try pasting this paragraph somewhere in your HTML file, and you’ll see that the entities &copy and ™ and rendered as the copyrights and trademark symbols on the browsers.

HTML entities syntax

The same copyrights symbol (©) and the trademarks symbol (™) can also be rendered using their digital representations &#169; and &#8482; respectively.

<p>&#169; Copyrights 2023. All rights reserved. &#8482;</p>

This will give you the same result.

So as you can see, the syntax consists of an ampersand & followed by the entity name or number, and then terminated by a semicolon ;. You can use any of the two types of representations - entity names or entity numbers.

Entity names are human-readable names that correspond to specific characters. For example, to represent the copyright symbol (©), we use the entity name &copy;. Similarly, the less-than sign (<) can be represented using &lt;. Using entity names makes the code more readable and intuitive.

Entity numbers, on the other hand, are numeric codes that correspond to specific characters in the character set. They provide a universal way to represent characters, irrespective of the character encoding or font used.

You can use the representation of your choice or based on the project requirements.

Below is a table of some commonly used special characters along with their entity names and numbers:

Here’s the complete HTML entities reference page.

2

2

1

Shruti Balasa
Full Stack Web Developer & Tech Educator

More Articles

Showwcase is a professional tech network with over 0 users from over 150 countries. We assist tech professionals in showcasing their unique skills through dedicated profiles and connect them with top global companies for career opportunities.

© Copyright 2025. Showcase Creators Inc. All rights reserved.