XHTML Class Guide and Reference
Make your own web pages

Special Characters

If you want to force certain characters to show up, you will need to use escape codes instead of those characters. Escape code is just a programming term for replacing characters that a program uses in a special way with something else.

All of these codes start with an & and end with a ; between these characters is either a short mnemonic indicating what the character is or a number code starting with #. The mnemonics are easier to remember, but some of them only work in certain browsers. The number codes will work when the mnemonics don't.

  •   to    force the browser to insert extra blank spaces. This can also be used to hold phrases together when you want to be sure that they are all on the same line. Play with making this page narrower & wider to see how the previous sentence is affected. View source to see where the  s are in it.

    You will see that  s can also be useful when making tables.

  • & to show a & (ampersand) or &

  • &lt; to show a < (less-than sign) or &#60;

  • &gt; to show a > (greater-than sign) or &#62;

You have to use < and > in every tag when you make a web page, but only occasionally (if ever) in the text of a page unless it is about mathematics or how to do HTML. So the tags get to use the simple < & > characters and if you want to show the characters in your page text you will have to type the codes.

Codes for other special characters, such as ¢ £ ¥ ® © ½ ° ± á ç è ñ ö ÷ û ²etc. can be found at these sites:
W3C specified special character codes
List from WebMonkey that shows what characters look like