Term of the Moment

iPhone vs. Android


Look Up Another Term


Definition: ampersand codes


A set of HTML "escape codes" used to render special characters and foreign letters. Ampersand codes are preceded with an ampersand, followed by a mnemonic name or their ASCII number and ended with a semicolon. They are also used to enable HTML and XML tags to display intact for instructional purposes, rather than be executed by the rendering engine.

The example below uses the HTML codes for the less-than (<) and greater-than (>) characters, which open and close an HTML or XML tag. The first example shows the word "Hello" coded as a boldfaced word, and the Web browser would display it bold without the tags. In the second example, used for teaching HTML, the tags and word would be displayed. See escape code.





Following are widely used HTML ampersand codes. Ampersand codes can always be written as an ASCII number (see ASCII chart); however, many commonly used symbols have mnemonic equivalents such as the "lt" and "gt." Note that numeric codes include a number sign (#) before the number.