Great Escapes

A joke that will get you alot of laughs in one context may get you fired or arrested in a different context. Some times context is everything.

The following line appears on a html web page.

<svg width="300" height="300">SVG code here</svg>

The less than brackets, greater than brackets and double quotes have special meanings in the contexts of html and JavaScript. Often a single quote ' can be substituted for a double quote " . This technique is useful to create a quoted string within a quoted string.
Some characters must be written as escape sequences to show them on a html page. The common html sequences begin with an ampersand and end with a semicolon. If you want you want to display the ampersand symbol on an html page, you need the ampersand escape sequence which is the ampersand symbol, the letters amp and a semicolon.

Three common html escape sequences are

quot=quote; lt=less than; gt=greater than;

The below line...
&lt svg width=&quot;300&quot; height=&quot;300 &quot;&gt;SVG code here&lt;/svg&gt;

Creates this line on an html page.
<svg width="300" height="300">SVG code here</svg>

JavaScript escape example

JavaScript often places text on to html pages. The less than and greater than brackets do not need to be escaped because they are included within the quotes of a JavaScript string variable. Some of the quotes are escaped within the JavaScript string (text) variable by use of a \ backwards slash escape sequence. In the above code fragment a JavaScript variable that contains SVG is used to set the inner html of a tag on a html page.
home unit circle