Slack 'n' Hash

HTML Tutorial

HTML Entities

Given that HTML consists of tags that contain left and right angle brackets and quote marks, one might think that trying to display those symbols on a web page is a bit of a headache. It's actually quite easy. HTML makes use of entities. An entity is a representation of a character, whether it's a letter, a number, or some other piece of character data. It consists of an ampersand (&), the name or number of the entity, and a semicolon (;).

HTML Entities
Description Entity Character Number
Non-breaking space      
Less than &lt; < &#60;
Greater than &gt; > &#62;
Ampersand &amp; & &#38;
Quotation mark &quot; " &#34;
Apostrophe / single quote &apos; ' &#39;

That's not the be-all and end-all of it, though; there are hundreds of other entities, covering such subjects as currency, accented vowels, mathematical symbols; search for an HTML entities reference to get a complete list. If you intend to spend any appreciable length of time working on web pages, you'll find it very useful indeed.


Last modified: 26/11/08. All material ©2003-8 its creators.

Customise the Sidebar