Certain characters can't be typed in using the keyboard because they serve a special function. When a web browser looks at a web page it looks for the "<" and ">" characters to figure out what is HTML tags, and what should be displayed. If that's the case, then we can't use < and > for anything else. So how do we show them in the page? It would make writing THIS page a pain in the butt!

We use a special sequence of characters that the browser will recognize as a command to print a specific character. In this case we use &lt; and &gt; to represent the < and >. This is what is called an 'escape sequence'.


All escape sequences begin with the ampersand ( & ), and end with a semi-colon ( ; ). You can place a special set of letters to designate a special character, or you can use the ASCII code for a character. This allows you to print nearly any character the computer can display.

Here is a table of special characters:

Character Escape Sequence   Character Escape Sequence
< &lt   > &gt;
& &amp;   " &quot;
· &middot;   © &copy;
® &reg;   &#153;
&#147;   &#148;
(non-breaking space) &nbsp;      


Bookmark this page and SHARE:  



Free Training