How to represent some special characters in HTML

NOTES at end.       home    back

AppearanceRepresentionsDescription
[ ]   space
[!] ! exclamation point
["] " " quotation mark
[#] # hash mark
[$] $ dollar sign
[%] % percent sign
[&] & & ampersand
['] ' apostrophe
[(] ( left parenthesis
[)] ) right parenthsis
[*] * asterisk
[+] + plus sign
[,] , comma
[-] - hyphen
[.] . full stop
[/] / forward slash
[0] to [9] 0 to 9 0 to 9 decimal digits
[:] : colon
[;] &#059; semicolon
[<] &#060; &lt; less than
[=] &#061; equals
[>] &#062; &gt; greater than
[?] &#063; question mark
[@] &#064; commercial at
[A] to [Z] &#065; to &#090;A to Z capital letters
[[] &#091; left square bracket
[\] &#092; backslash
[]] &#093; right square bracket
[^] &#094; caret
[_] &#095; underline
[`] &#096; grave accent
[a] to [z] &#097; to &#122; a to z lower case letters
[{] &#123; left curly brace
[|] &#124; vertical bar
[}] &#125; right curly brace
[~] &#126; tilde
[ƒ] &#131; florin
[…] &#133; ellipsis
[†] &#134; dagger
[‡] &#135; double dagger
[ˆ] &#136; circumflex
[‰] &#137; permil
[‹] &#139; less than sign
[Œ] &#140; capital OE ligature
[‘] &#145; left single quote
[’] &#146; right single quote
[“] &#147; left double quote
[”] &#148; right double quote
[•] &#149; bullet
[–] &#150; en dash
[—] &#151; em dash
[˜] &#152; tilde
[™] &#153; trademark
[›] &#155; greater than sign
[œ] &#156; small oe ligature
[Ÿ] &#159; capital Y umlaut
[ ] &#160; &nbsp; non-break space
[¡] &#161; &iexcl; inverted exclamation
[¢] &#162; &cent; cent sign
[£] &#163; &pound; pound sign
[¤] &#164; &curren; general currency sign
[¥] &#165; &yen; yen sign
[¦] &#166; &brvbar; broken vertical bar
[§] &#167; &sect; section sign
[¨] &#168; &uml; umlaut
[©] &#169; &copy; copyright
[ª] &#170; &ordf; feminine ordinal
[«] &#171; &laquo; left angle quote
[¬] &#172; &not; not sign
[­] &#173; &shy; soft hyphen
[®] &#174; &reg; registered trade mark
[¯] &#175; &macr; macron accent
[°] &#176; &deg; degree sign
[±] &#177; &plusmn; plus or minus
[²] &#178; &sup2; superscript 2
[³] &#179; &sup3; superscript 3
[´] &#180; &acute; acute accent
[µ] &#181; &micro; micro sign (mu)
[¶] &#182; &para; paragraph sign
[·] &#183; &middot; middle dot
[¸] &#184; &cedil; cedilla
[¹] &#185; &sup1; superscript 1
[º] &#186; &ordm; masculine ordinal
[»] &#187; &raquo; right angle quote
[¼] &#188; &fract14; fraction one-fourth
[½] &#189; &fract12; fraction one-half
[¾] &#190; &fract34; fraction three-fourths
[¿] &#191; &iquest; inverted question mark
[×] &#215; &times multiply sign
[÷] &#247; &divide; divide sign
NOTES:

I have shown square brackets round each character to show its size. The third column shows alternative named codes to avoid remembering the numbers.

Codes 32 to 126 are commonly called ASCII (pronounced askey) and are common to a large number of computer codes. Most, but not all, can be used in an HTML file without special coding. The following must be coded or they will cause an error in the interpretation of your document:

  •    & as &amp;
  •    < as &lt;
  •    > as &gt; (recommended)
  • and all codes with numbers above 127. This includes the pound sign, £, with the code &pound;
Don't forget that semicolon!

© David Broughton, 2000-03-13, Revised 2003-02-04