HTML Java

HTML Entities


HTML Entities

  • Some characters are reserved in HTML and they have special meaning when used in HTML document.
  • If you use the less than (<) or greater than (>) signs in your text, the browser might mix them with tags.
  • Character entities are used to display reserved characters in HTML.

Example

<html>
<body>
  <h2>HTML Entities</h2>
  <p><div id = "character"></p>
</body>
</html>
Try it »


Some Useful HTML Character Entities

Result Description Entity Name Entity Number
non-breaking space &nbsp; &#160;
< less than &lt; &#60;
> greater than &gt; &#62;
& ampersand &amp; &#38;
" double quotation mark &quot; &#34;
' single quotation mark (apostrophe) &apos; &#39;
¢ cent &cent; &#162;
£ pound &pound; &#163;
¥ yen &yen; &#165;
euro &euro; &#8364;
© copyright &copy; &#169;
® registered trademark &reg; &#174;