Escape_Characters

One of the complications of dealing with HTML is what to do when you want a character to show up on your screen that is normally innocuous, but has special meaning in HTML.

For example, if you wanted to make a simple arrow: <--

In HTML, this is a problem. If you use a "<" character in HTML, the computer will assume you are creating a new tag and be confused about where the end of the tag is! (Actually most browsers will figure it out... but the results may not be exactly what you meant.

The solution is to use an escape code. The escape code for the "less than" (<) sign is &lt;. Similarly, the escape code for the "greater than" (>) sign is &gt; So the line above would be coded as: code format="html4strict" For example, if you wanted to make a simple arrow: &lt;- code and when the page rendered, the &lt; would be replaced by a "<" sign.

There are many other codes out there for funny characters, most of which you will not use. The other common issue is with the ampersand (&) sign, which now has a special meaning of its own, which we just learned about! It's code is "&amp;" The phrase "cream cheese & jelly" must be written "cream cheese &amp; jelly." We might see the line immediately after the code example above would be: code format="html4strict" and when the page rendered, the &amp;lt; would be replaced by a "&lt;" sign. code You won't use escape codes too often, but when you do, they are important. Sometimes you will see them in web programs when they get confused, too!