This tutorial and others may now be downloaded! Click Here for details.

HTML Basics
Special Characters
Special characters are symbols that may not be included on your keyboard such as "¢" and symbols that are reserved for HTML use such as "<" and ">". HTML contains special markup for displaying these symbols in your document. This markup begins with an ampersand(&) and ends with a semi-colon (;).

This makes more sense with an example. Suppose you want to show in your document the proper syntax of the HTML IMG tag.

<img src="filename" width="" height="" align="" border="" alt="">
If you just put the above tag syntax as-is in your document, the browser will try to interpret it as HTML and will display a white box with a red x, which is the default picture for a missing image. This is because the "<" and ">" symbols are interpreted as the start and end of an HTML tag.

Instead, use the HTML markup for these special characters, &lt; for "<" and &gt; for ">". Now you can show the the proper syntax by using...

&lt;img src="filename" width="" height="" align="" border="" alt =""&gt;
There are many more special characters that have this markup. Below is a list of those that are commonly used.

SymbolMarkup
"&quot;
&&amp;
<&lt;
>&gt;
blank space&nbsp;
¢&cent;
©&copy;
®&reg;
½&frac12;
¼&frac14;
¾&frac34;
&lsquo;
&rsquo;
&ldquo;
&rdquo;

As an exercise, try reproducing the table above.

Next >>

Copyright © 2004, Chisholm Technologies Inc.