HTML Entities




Entities, what’s this? Is it the same as tag? Well, No! Entities are symbols that you insert in your test such as a dollar sign a hash sign or a greater than or lesser than symbol.

 

In a HTML page, you specify an entity by its name. The format of an entity is – ampersand, name, and semicolon.

 

The table below lists out some common entities:

 

§         Entity

§         Description

§         Entity Name

< 

less than

&lt;

> 

greater than

&gt;

&

ampersand

&amp;

 

non-breaking space

&nbsp;

©

copyright

&copy;

®

registered trademark

&reg;

"

quotation mark

&quot;

 

 

 

Why can you not just use the symbol, instead of the entity name in your HTML page?

 

In HTML, symbol stand for some thing else and so it will confuse the browser if you use it as such in your HTML page an so you need to use the entity name instead.

 

Here is a look at how you insert entities in a HTML page:

 

<p>

Lesser Than - &lt;

non-breaking space - &nbsp;; <br />

Greater than - &gt; <br />

</p