Web Design Made Simple Web Design Made Simple

debbie T Designs - Web Design Made Simple

Special Characters

Special characters like > < & and " should not be typed as is on a web file. To display them in web page text, a special code must be used. The browser will then render the code and display the character.

Here is a brief list of a few popular special characters codes:

Code Renders As Description
&amp; & Ampersand
&quot; " Double quote
&lt; < Left Bracket (less than)
&gt; > Right Bracket (greater than)
&nbsp; [space] non-breaking space will add
extra space to your text.
&copy; © Copyright symbol
&frasl; Slash
&reg; ® Registered Trademark
&deg; ° Degree
&frac12; ½ Half fraction

Each special code starts with an & (ampersand) character and ends with a ; (semi-colon.)

Here is a paragraph using some special characters:

Mindy said, "Let’s split ½ this pizza with Jack & Mike."

Here is the (X)HTML code:

<p>Mindy said, &quot;Let's split &frac12; this pizza with Jack &amp; Mike.&quot;</p>

Validation Errors Caused by URLs with & in the File Name

You might have received validation errors when validating your anchor tags containing URLs such as http://www.kraftfoods.com/main.aspx?s=product&m=product that included an ampersand "&" in the middle of the file address.

To fix this, just edit the url. Change the & to the special character of &amp; and the link will still work, plus your page will validate.

http://www.kraftfoods.com/main.aspx?s=product&amp;m=product

Helpful Links

There are a lot more special character codes to play with. Here are two sites that have some great lists of characters codes.

2 Comments

  1. Comment by Jay Huemann on November 12th, 2008

    Web Monkey link did not work.

    j. Huemann

  2. Comment by debbie T on November 15th, 2008

    Thanks, I updated the link!