View video tutorial

HTML Entities

HTML

An HTML character entity is a special code that represents characters that cannot be typed directly in HTML or that carry special meaning within the HTML syntax. An HTML entity is piece of text starting ampersand (&) and ending with semicolon (;). These entities ensure that characters are displayed correctly by the browser and are not misinterpreted as HTML tags or markup.

HTML Entity characters


➔ Entities are used to display reserve characters in HTML page.

➔ Entities are enclosed by beginning with ampersand (&) and ends with a semicolon (;).

➔ For example: > is for >© is for ©® is for ®" is for " character.

➔ Any reserve characters used in html page without entity symbol, HTML will consider that character as part of the HTML language.

<H1> here < and > has a special meaning to HTML ie starting and ending sign. But here 5 > 2, the > is just a greater than character.

➔ Entity number(Decimal or Hexadecimal) can also be used instead of entity name. Ex: &#60;, &#x0003C; or &lt; is for < character.

Learning with HTML Editor "Try it Now"

You can edit the HTML code and view the result using online editor.

Example

<!DOCTYPE html>
<html>
   <head>
      <title>HTML Entities</title>
   </head>
   <body>
      &lt;h1&gt; is a heading and  &lt;p&gt; is a paragraph tag.
   </body>
</html>
Try it Now »

Click on the "Try it Now" button to see how it works.


HTML Entities Latin-1

Hex 0000-00FF / Dec 128-255

Char Dec Hex Name
" 34 0022 QUOTATION (&quot;)
& 38 0026 AMPERSAND (&amp;)
' 39 0027 APOSTROPHE
< 060 003C LESS-THAN (&lt;)
> 062 003E GREATER-THAN (&gt;)
128 0080 EURO (&euro;)