Entity: Definition

Some characters are reserved in HTML. If you use the 'less than' (<) or 'greater than' (>) symbols in your HMTL document, the browser might confuse them for tags. The character entities were invented to display reserved characters in HTML. The advantage of using an entity name, instead of a number, is that the name is easier to remember. The disadvantage is that browsers may not support all entity names, but the support for entity numbers is excellent.

Character entities for the 'less than' symbol is &lt; (name) and &#60; (number)

Character entities for the 'greater than' symbol is &gt; (name) and &#62; (number)

Good habit A memory tip: Both entity names and entity numbers alway start with the ampersand (&) and ends with the semicolon (;).
Back button Table of Contents Next button