HTML Character Entities and Codes

This article was created and published to list some of the characters that cannot be found on a normal keyboard, along with their entities and codes. Sometimes, we need to put some characters on the web, like "copyright sign (©)," "registered trade mark sign (®)," etc., but these types of symbols, signs, or characters cannot be found on the normal keyboard; therefore, we can use the HTML entity or code to put these characters on the web.

However, some of the characters, like "less than sign (<)", "greater than sign (>)", etc., are available on the normal keyboard, but using them directly on the web is not a professional way. Rather, use its entity or code. As a result, this article was written to guide you through the process of using HTML entities and codes to display characters on the web.

Some special characters, such as > and <, may be required in the content of an HTML element. These characters are referred to as "entities." So, using the various character entities, HTML allows us to include such symbols in the content of an element. The character entities are referred to as "character encodings" by the World Wide Web Consortium (W3C). Some characters, such as Greek and Chinese, do not appear on the user's keyboard. As a result, they cannot be typed directly from the keyboard. This issue can be avoided by using character entities in an HTML document.

The character entity is made up of the following parts in the following order:

List of the most commonly used HTML character entities

The table below contains codes and entity names for some of the most commonly used and well-known HTML character entities.

HTML Entity HTML Code Character, Symbol, and Sign
&lt; &#60; <
&gt; &#62; >
&amp; &#38; &
&quot; &#34; "
&apos; &#39; '
&copy; &#169; ©
&reg; &#174; ®
&commat; &#64; @
&trade; &#8482;
&phone; &#9742;
&#9787;
&#9993;
&#9997;
&check; &#10003;
&cross; &#10007;
&#10010;
&cent; &#162; ¢
&pound; &#163; £
&yen; &#165; ¥
&euro; &#8364;
&dollar; &#36; $

That's it. The table above includes all of the most commonly used and well-known HTML characters, as well as their entities and codes. Now let me give an example to show how to implement these entities and/or characters to put the character on the web.

<!DOCTYPE html>
<html>
   <body>
      
      <h2>Company Name</h2>
      <p>Lorem ipsum dolor sit amet consectetur adipisicing elit.</p>

      <footer>
         <p>&phone; +11234567890 | &#9993; admin@company.com</p>
         <p>&copy; 2022 Company</p>
      </footer>

   </body>
</html>

The output produced by the above HTML example, which uses a total of three HTML entities, should exactly be:

html character entities and codes example

The contact information that was provided in the example earlier has nothing to do with us. The only reason I recorded the random numbers was to use them as an example.

HTML Online Test


« Previous Tutorial Next Tutorial »


Liked this post? Share it!