Escape sequences

Why "escape sequences"?

One reason is that in HTML, the angle brackets "<" and ">" are used for the beginning and ending of tags. If you just wrote < or > in your page source, the browser might well think you are starting a tag that it doesn't recognise, and so it might ignore the text. Netscape is very forgiving (too much?) and you can sometimes get away with it. If you write "<abracadabra>" you are in trouble - - (nothing visible between the dashes in the browser, but look in the source!). So, you have to "escape" from the usual behaviour of the browser, and to do this you start off with the character &. When the browser comes across &, it stops treating the characters as normal text, and tries to recognise a code for the character you really want.

Even though it sometimes works with some browsers, to be on the safe side, you should not write plain <, >, or & in your page source, but instead you should write &lt; &gt; or &amp; . You can write " rather than &quot; safely in normal text, but not inside tags themselves, where it is used in a special way.

But these annoying complications are worth it, because escape codes are very useful, as they allow you to display all kinds of characters that are not on your keyboard. You can have accented letters, very useful in French or Italian, such as é, à, ô, and lots of symbols like «, », ¶, ¼, © and so on - and particularly these days €!

You can see one of these pages showing all of them, or you could look at the original in Germany from which I got the idea.