3.4 HTML entities

The less-than and greater-than characters used in HTML tags are special characters and must be escaped to obtain their literal meaning. The escape sequences are called entities. All entities start with an ampersand so the ampersand is also special and must be escaped. Entities provide a way to include some other special characters and symbols within HTML code as well. Table 3.2 shows some common HTML entities.


Table 3.2: Some common HTML entities.
Character Description Entity
< less-than sign &lt;
> greater-than sign &gt;
& ampersand &amp;
$\pi$ greek letter pi &pi;
$\mu$ greek letter mu &mu;
  Euro symbol &euro;
£ British pounds &pound;
© copyright symbol &copy;



Paul Murrell

Creative Commons License
This document is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.