[Index] [Up] [Back] [Next]

4.8 Special Characters in HTML

Certain characters, such as the left bracket (<), ampersand (&), etc. are reserved by HTML to represent special attributes such as the start of HTML elements, graphic characters, and so on. In addition there are many ISO-Latin 1 characters that you may wish to include in a document, but which are not trivially available on a standard keyboard.

HTML allows special referencing to represent these special characters. These are indicated by either character references or entity references. Character references are composed of three parts:

Thus the character reference for less than symbol (<) is &#60;.

Entity references are similar, but use symbolic names to represent the characters. Entity references also have three parts:

Thus the entity reference for less than symbol (<) is &lt;.

Note that, in HTML, not all the valid characters have corresponding entity references. In theses cases you must used the direct numerical character references. The attached document gives a list of all the ISO Latin-1 characters, showing the numeric decimal codes and the entity references (if are defined).


[Index] [Up] [Back] [Next]