Symbols – HTML

Symbols

HTML symbol entities are characters that are not represented on a user’s keyboards. Many mathematical, scientific, and currency symbols
are not present on a normal keyboard; therefore, to add such symbols to a page using HTML, the HTML entity name can be used.
It is important to note that these will not effect the HTML code themselves, and will always be interpreted as text. For example, if we wanted to type <div> as text on a webpage, we may need to use these symbol entities: &lt;div&gt.

If no entity name exists, either the entity number or hexadecimal reference can be used.

ResultDescriptionEntity NameEntity Number
 non-breaking space&nbsp;&#160;
<less than &lt; &#60;
>greater than &gt; &#62;
&ampersand&amp;&#38;
¢cent&cent;&#162;
£pound &pound; &#163;
¥yen &yen; &#165;
euro &euro; &#8364;
©copyright &copy; &#169;
®registered trademark &reg; &#174;

Ampersand escape

If you want to show the entity name on a webpage like this:

<p><html></p>

Then you need to use an ampersand escape, like below:

<p>&lt;html&gt;</p>

This will display the entity name rather than the entity.

More Information:

This article needs improvement. You can help improve this article. You can also write similar articles and help the community.