Your Ad Here
HTML Basics

Bookmark and Share
HTML Character Entities

Some characters have a special meaning in HTML, like the less than sign (<) that defines the start of an HTML tag. If we want the browser to actually display these characters we must insert character entities in the HTML source.

A character entity has three parts: an ampersand (&), an entity name or a # and an entity number, and finally a semicolon (;).

To display a less than sign in an HTML document we must write: &lt; or &#60;

The advantage of using a name instead of a number is that a name is easier to remember. The disadvantage is that not all browsers support the newest entity names, while the support for entity numbers is very good in almost all browsers.

Note: The entities are case sensitive.

Examples

=> non-breaking space &nbsp; &#160;
=> < less than &lt; &#60;
=> > greater than &gt; &#62;
=> & ampersand &amp; &#38;
=> " quotation mark &quot; &#34;

Today's Deal