Introduction     Sitemap

Ken Ward's HTML Tutorial ...

Special Characters

Certain characters are not available on some keyboards, and some characters, if used in HTML code will be interpreted by the browser as code, rather than literal letters. For example, "<" and ">" all by themselves would be thought of as TAGS by the browser. When writing HTML code, I have had to use special characters to write these so they show up as < or >!

Note: some wysiwyg HTML editors will rewrite these so you do not get the symbol in the browser. That is when you write &pi; it doesn't recognise it and writes the HTML as &amppi; - which is not intended! Left alone, they work fine in browsers!

To write, for example:


You actually have to write:


Where &lt; is the special character for <. Instead of using &lt; - the less than sign - you could use the number, which in this case is 60, as follows:


And instead of using the &gt; special character, called greater than, you could use its number form, which is:


On other occasions, you might want to write something that is not on the keyboard, for example


Where you would have to write in the HTML code &#247; or &divide; to get that symbol. People who need to write mathematical formulae or languages which do not use the English script, find the special characters extremely useful. The rest of us have only an occasional need for one or two of them. Following is a list of some that I personally have used:

Character Number Name Use
&hellip; &#133; &hellip; Occasionally it is better to use the proper ellipsis rather than to type three dots.
&gt; &#062 > Mainly for writing HTML tutorials!
&lt; &#060 < ditto!
&amp; &#038 & ditto!
&mdash; &amp#151 or &#8212 When I want a long dash to break up some text!
&pi;   π  
&reg;   ®  

The delightful non-breaking space, &nbsp;

The non-breaking space does crop up now and again when writing HTML. If you want an empty table cell, then you have to put a non-breaking space in it. Similarly, if you want to leave some lines using <p>, then you need to put a non-breaking space between the <p>'s, otherwise you won't get your lines.

The following are characters I found interesting, but they have limited use for me!




&#8730; &radic;
&#8734; &infin;
&nbsp; &nbsp;  
&#8747; &infin;  
&#8212; &mdash;   —
&#133; &hellip;
&amp#8592; &larr;
&#8594; &rarr;
&#8595; &darr; ?
&#169;): &copy; :
&#174; &reg;
&#160; &nbsp;  
&#038 & &
&#062; &gt; >
&#060; &lt; <
&#247; &divide;
&#151; &mdash;

To learn more about special characters, there is some more information here:
Special characters 2
Special Characters 3
Special Characters 8000

[back to:  Fonts]
[on to: tables]

Most Recent Revision: 18-Oct-98.
Copyright 1998

I am always pleased to hear from you.
Send your comments to