More Special Characters

Back in issue 3 I introduced the use of Special Characters in your
HTML code. If you don't recall, special characters are a code sequence
used in HTML in order to print characters that are either not available
directly through the keyboard or which may be confused as HTML
control characters by the Browser. Examples of the former include

the Copyright ©, Trademark T and Registration ® symbols.
Examples of the latter include almost any character not in the
alphabet. Symbols such as <>&? may play havoc with your web
page if you simply try to use them as is.

You can define special characters and symbols in your HTML
document with a simple code that is started by an & (ampersand)
and terminated by a ; (semicolon). The code for the copyright

symbol © is &copy; the Trademark symbol T is &trade; and the
Registration symbol ® &trade; I posted a complete set at

These special codes are important for every HTML author to
know. A common mistake new Web Designers make is to simply
enter special characters into their HTML document whenever they
are needed. After all, they are located right there on your keyboard.
You may be lucky and get away with it. If the browser can
interpret the code however, it may produce strange results. How,
for example can you display the HTML command <BODY> on
your web page? This is obviously an HTML tag that a Browser
will interpret. The solution is to use the ampersand commands to
display the < and > symbols as in: &lt;BODY&gt;

When I covered this topic in issue 3 I promised to create a table of
the extended ASCII characters.

What are ASCII characters?

The ASCII characters are used on most computers (EBCDIC
is used on IBM Mainframes). An ASCII character is an 8bit byte
used to represent 1 of 256 characters. When you hit a key on your
keyboard for instance, you are entering a byte that represents the key
you typed. If you count your keys you will see that there are far
fewer than 256, even when you include the use of the shift key. This
is because the primary keys are represented by the first 7 bits which
give you 127 combinations. Of these 127, many characters are non
printable while others simply do not have a key to represent them.

So what are all the extra characters used for?

Codes 0 - 32 are control characters. 13 is a carriage return.
Codes 33 - 47 are symbols such as # $ % *
Codes 48 - 57 are the ten digits (0 - 9)
Codes 58 - 64 more symbols < > ?
Codes 91 - 96 more symbols [ \ ^
Codes 97 -122 lower case alphabet
Codes 123-126 more symbols {}~
Code 127 the Delete Key
Codes 128-255 the extended character set

In many text editors you can enter almost any character by pressing
the Alt key while typing the three digit ASCII value into the keypad
at the right of most keyboards. To add the letter A for instance, hold
the ALT key and enter 065. Although this is a tedious way to enter
the standard keys, it is a very simple way to access the extended
character set in a text editor. It is NOT the correct way to enter them
into a HTML document. This is because your text editor may not
support the Extended character set or because the characters may be

The correct way to enter special character codes into an HTML
document is through the use of the & tag with the four digit ASCII
code preceded by a pound (#) symbol. The letter A would then be
entered as &#0065;

So what special characters are included in the extended character set?

I have included a table of the entire extended character set at: is22fig3.
For your reference, I have also included that standard character set at

Note that a rectangular box is not a symbol. It means the character is
not printable and should be avoided.

One other thing to keep in mind, the ASCII character set is language
specific. A visitor to your site will see the characters that are defined
by their language. Since most web sites are designed for a specific
language, this should not present a problem.

"IMS Web Tips" ISSN 1488-7088
© Copyright 1999 Virtual Mechanics

"IMS Web Tips" is a weekly news letter for all web site managers regardless of experience who are looking for detailed information on creating, maintaining and promoting their web sites.
Web Engine
For the best in D HTML editors
Click here for a free WYSIWYG pixel precision HTML editor.
IMS WebTips

Archive by Topic
Archive by Date
Virtual Mechanics