Entities

HTML entities are used to display characters such as <,>,©.
A character entity has 3 parts:

  1. It begins with an amphersand &
  2. Followed by the name of the entity
  3. And ends with a semicolon;

Example 1:

The angle bracket < means less than. To show the the < on your website you have to type:

  1. &
  2. lt
  3. ;

Example 2:

The angle bracket > means greater than. To show the the > on your website you have to type:

  1. &
  2. gt
  3. ;

Below is a table showing some of the character entities. If you look at the heading Entity it shows you the 3 parts (amphersand, name of entity, semicolon).

To get the correct symbol make sure when you type the character entity that there is no space between the aphersand,name of entity and semi-colon.

There is no symbol for the non-breaking space - all it does is create a blank space.



Symbol Description Entity
< less than &lt;
> greater than &gt;
© Copyright &copy;
Non non-breaking space &nbsp;
& amphersand &amp;
" double quotation marks &quot;
' single quotation mark &apos;
£ pound sign &pound;



Now do the Exercise!