Logos for HTML5, CSS3, Javascript, jQuery, Bootstrap, and Wordpress

blog posts.

HTML character entitites.

Published:

HTML Character Entities employ a code representation of a character that's used when you want to include a special character (such as @, ¥, or π) or a character that HTML would usually read as an instruction (such as > or <) in your HTML code.

The format consists of an itentifier for the specific code with an ampersand prefix and a semi-colon suffix. Here's an example based on the first paragraph of this post showing what a line of code with HTML Character Entities included looks like. The character entities have been highlighted:

              
HTML Character Entities are used when you want to include a special character (such as &commat;, &yen;, or &pi;) or a character that HTML would usually read as an instruction (such as &lt; or &gt;) in your HTML code.
              
            

Commonly used codes include:

  • < = &lt;

  • > = &gt;

  • & = &amp;

  • / = &sol;

  • @ = &commat;

  • © = &copy;

  • ® = &reg;

  • £ = &pound;

  • ½ = &half;

  • ñ = &ntilde;

To see more examples of the wide range of available HTML Charactr Entity codes, including non-English alphbets, a good place to visit is the W3C website which has a table of characters and their codes. However, some browsers may not support all codes, so it's worth spending a little time checking that any code you want to include is widely supported.

contact me.