Step 3 – Create HTML Code (Cont.)

Special Character Codes

HTML 4.0 includes over 200 special characters or character entities such as ©, ®, ˜, ™ and £. Also, when you code your documents with HTML, certain characters are reserved.

Certain characters, such as the left bracket (<), ampersand (&) and right bracket (>) are reserved by the HTML language to represent special attributes. In addition, there are many characters that you may wish to include in an HTML document, but aren’t available on a standard keyboard. But, HTML does allow you to use special referencing to represent these special characters.

The official name for a special character is a character entity. In HTML, you can write a special character in two ways:

  1. The easiest way to write a special character is called the symbolic reference. But, all browsers don’t support symbolic references.
  2. The second way to write a special character is called the numeric reference. Most browsers support numeric references.

Symbolic references start with an ampersand, an abbreviation for the symbolic expression, and ends with a semi-colon.
For example: &copy; for ©.

Numeric references also start with an ampersand and finish with a semicolon, but between them is a number preceded by a hash (#).
For example: &#169; for ©.

Design tips: When you use a special character be careful for the following reasons:

  • » Character references are case-sensitive.
  • » The actual display of a special character is governed by the active font used by your viewer’s browser. Most fonts contain only 256 characters and are not capable of displaying 256 characters, plus over 200 special characters.
  • » Some versions of Netscape Navigator (N) and older Macintosh (Mac) have a problem displaying some symbolic references special characters.

To include a special character on your Web page:

  • » Decide which character category you want to use.
  • » Next, decide if you want to use the symbolic or numeric code.
  • » Then place the corresponding code on your Web page to format this character.

Select the special character category you want to use. Use your Back button to return to this list.

Commonly used special characters

These will work in most browsers, except were noted.

Browser display Numeric Symbolic Description
´ &#180; &acute; acute accent
& &#38; &amp; ampersand
¦ &#166; &brvbar; broken vertical bar
&#8226; &bull; bullet
¸ &#184; &cedil; cedilla
¢ &#162; &cent; cent
© &#169; &copy; copyright
° &#176; &deg; degree (circle may fill on older Macs)
÷ &#247; &divide; division
½ &#189; &frac12; fraction half (not on older Macs)
¼ &#188; &frac14; fraction quarter (not on older Macs)
¾ &#190; &frac34; fraction three quarters (not on older Macs)
> &#62; &gt; greater than
¡ &#161; &iexcl; inverted exclamation mark
¿ &#191; &iquest; inverted question mark
« &#171; &laquo; left-pointing double angle quotation mark
< &#60; &lt; less than
¯ &#175; &macr; macron
µ &#181; &micro; micro
  &#160; &nbsp; non-breaking space
¬ &#172; &not; not
&#182; &para; paragraph
± &#177; &plusmn; plus-minus
&#34; &quot; quotation mark
® &#174; &reg; registered
» &#187; &raquo; right-pointing double angle quotation mark
§ &#167; &sect; section
¨ &#168; &uml; umlaut/diaeresis
× &#215; &times; multiplication
&#8482; &trade; trade mark

Currency special characters codes

These currency special characters work in most browsers

Browser display Numeric Symbolic Description
&#8364; &euro; euro sign
£ &#163; &pound; pound sign
¥ &#165; &yen; yen sign
¤ &#00A4; &curren; international
currency sign*

* – not used much.

The dollar ($) isn’t defined a special character.

Other special character codes

These should work in most browsers, except where noted.

Browser display Numeric Symbolic Description
&#8222; &bdquo; double low-9 quotation mark
ˆ &#710; &circ; modifier circumflex accent
&#8224; &dagger; dagger
&#8225; &Dagger; double dagger
&#8230; &hellip; horizontal ellipsis
&#8220; &ldquo; left double quotation mark
&#8249; &lsaquo; single left-pointing angle quotation mark
&#8216; &lsquo; left single quotation mark
· &#183; &middot; middle dot
&#8212; &mdash; em dash
&#8211; &ndash; en dash
&#8240; &permil; per mill sign
&#8250; &rsaquo; single right-pointing angle quotation mark
&#8217; &rsquo; right single quotation mark


&sbquo; single low-9 quotation mark
&#173; &shy; soft hyphen (doesn’t work in all IE or N browsers)
ª &#170; &ordf; feminine ordinal indicator
º &#186; &ordm; masculine ordinal indicator
&#8221; &rdquo; right double quotation mark
˜ &#732; &tilde; small tilde

Playing card suits special characters codes

Browser support for these card suits is poor. But, new browser support is improving.

Browser display Numeric Symbolic Description
&#9824; &spades; black spade suit
&#9827; &clubs; black club suit
&#9829; &hearts; black heart suit
&#9830; &diams; black diamand suit

Note: The Diamond () symbol doesn’t work with verdana font. Try using the system or arial font. See font for why? You can add color with the <font color=”red”> Tag. For example: .