IWPCUG logo

How to represent some special characters in HTML

NOTES at end.

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 90 to 9decimal 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 Zcapital 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 zlower case letters
[ { ]&#123;left curly brace
[ | ]&#124;vertical bar
[ } ]&#125;right curly brace
[ ~ ]&#126;tilde
[ ƒ ]&#402;&fnof;florin
[ … ]&#8230;ellipsis
[ † ]&#8224;&dagger;dagger
[ ‡ ]&#8225;&Dagger;double dagger
[ ˆ ]&#136;&circ;circumflex
[ ‰ ]&#137;&permil;permil
[ ‹ ]&#139;less than sign
[ Π]&#338&OElig;capital OE ligature
[ ‘ ]&#8216;&lsquo;left single quote
[ ’ ]&#8217;&rsquo;right single quote
[ “ ]&#8220;&ldquo;left double quote
[ ” ]&#8221;&rdquo;right double quote
[ • ]&#149;&bull;bullet
[ – ]&#150;&ndash;en dash
[ — ]&#151;&mdash;em dash
[ ˜ ]&#732;˜tilde
[ ™ ]&#x2122;trademark
[ › ]&#155;greater than sign
[ œ]&#339;œsmall oe ligature
[ Ÿ ]&#376;Ÿ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;&timesmultiply 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:

Don't forget that semicolon!

© David Broughton, 2000-03-13, Revised 2003-02-04; Revised by D Groom 2013