HTML Codes for Punctuation and Other Characters

The HTML codes you will need to add special characters to a webpage

Man and Code
A DTD defines what the code is so that a computer can read it. Image courtesy Photographer's Choice / Getty Images

There are a number of characters that you may want to use on a website, like ¶ and ©, but these characters do not appear on a standard keyboard. This means that you cannot simply type the characters into your webpage and expect them to appear. To use these characters, you must add the codes for them to your site's HTML markup. These commonly used characters are presented on this page.

There are also some special characters that don't really fit into any specific category.

Things like card suits (♠, ♣, ♦, and ♥), arrows (←, →, ↑, and ↓), gender symbols (♀ and ♂), and musical symbols (♩, ♪, ♬, ♭, and ♯) may be needed for certain websites. You can learn how to write these characters on this page as well.

The following list includes the HTML codes for punctuation characters not in the standard character set. Not all browsers support all the codes, so be sure to test your web pages before you launch them for the world to see.

Note that some punctuation characters are part of the Unicode character set, so you need to declare that in the head of your document with the meta charset tag:

<meta charset="utf-8"/>

HTML Punctuation Special Characters

DisplayFriendly CodeNumerical CodeHex CodeDescription
  &#09;&#x09;Horizontal Tab
  &#10;&#x10;Line Feed
  &#32;&#x20;Space
!!&#33;&#x21;Exclamation Point
"&quot;&#34;&#x22;Double Quote
##&#35;&#x23;Number Sign
&&amp;&#38;&#x26;Ampersand
''&#39;&#x27;Single Quote
((&#40;&#x28;Left Parenthesis
))&#41;&#x29;Right Parenthesis
**&#42;&#x2A;Asterisk (Star)
,,&#44;&#x2C;Comma
--&#45;&#x2D;Hyphen
..&#46;&#x2E;Period
//&#47;&#x2F;Forward Slash
::&#58;&#x3A;Colon
;;&#59;&#x3B;Semi-Colon
??&#63;&#x3F;Question Mark
@@&#64;&#x40;At Sign
[[&#91;&#x5B;Left Square Bracket
\\&#92;&#x5C;Back Slash
]]&#93;&#x5D;Right Square Bracket
^^&#94;&#x5E;Caret
__&#95;&#x5F;Underscore
{{&#123;&#x7B;Left Curly Brace
||&#124;&#x7C;Vertical Bar
}}&#125;&#x7D;Right Curly Brace
~&tilde;&#126;&#x7E;Vertical Bar
&sbquo;&#130;&#x82;Single Low Quote
&dbquo;&#132;&#x84;Double Low Quote
 &#133;&#x85;Elipsis
&dagger;&#134;&#x86;Dagger
&Dagger;&#135;&#x87;Double Dagger
&lsaquo;&#139;&#x8B;Left Single Angle Quote
&lsquo;&#145;&#x91;Left Single Quote
&rsquo;&#146;&#x92;Right Single Quote
&ldquo;&#147;&#x93;Left Double Quote
&rdquo;&#148;&#x94;Right Double Quote
 &#149;&#x95;Small Bullet
&ndash;&#150;&#x96;En Dash
&mdash;&#151;&#x97;Em Dash
&trade;&#153;&#x99;Trademark
&rsaquo;&#155;&#x9B;Right Single Angle Quote
 &nbsp;&#160;&#xA0;Non-Breaking Space
¡&iexcl;&#161;&#xA1;Inverted Exclamation Point
¦&brvbar;&#166;&#xA6;Broken Vertical Bar
©&copy;&#169;&#xA9;Copyright
ª&ordf;&#170;&#xAA;Feminine Ordinal Indicator
«&laquo;&#171;&#xAB;Left Angle Quote
¬&not;&#172;&#xAC;Not Sign
­&shy;&#173;&#xAD;Soft Hyphen
®&reg;&#174;&#xAE;Registered Symbol
°&deg;&#176;&#xB0;Degree
²&sup2;&#178;&#xB2;Superscript 2
³&sup3;&#179;&#xB3;Superscript 3
µ&micro;&#181;&#xB5;Micro Sign
&para;&#182;&#xB6;Pilcrow (Paragraph Sign)
·&middot;&#183;&#xB7;Middle Dot
¹&sup1;&#185;&#xB9;Superscript 1
º&ordm;&#186;&#xBA;Masculine Ordinal Indicator
»&raquo;&#187;&#xBB;Right Angle Quote
¿&iquest;&#191;&#xBF;Inverted Question Mark
 &#8453;&#x2105;Care Of
 &#8319;&#x207F;Superscript N
§&sect;&#167;&#xA7;Section Mark
¨&iquest;&#191;&#xBF;Inverted Question Mark
 &#8213;&#x2015;Horizontal Bar
 &#8227;&#x2023;Triangle Bullet
&oline;&#8254;&#x203E;Overline
 &#8252;&#x203C;Double Exclamation Point
 &#8470;&#x2116;Number Word

Other Character Codes

Note: not all of these characters will display on every browser, be sure to test before you rely on them for your website.

DisplayFriendly CodeNumerical CodeHex CodeDescription
&spades;&#9824;&#x2660;Spade card suit
&clubs;&#9827;&#x2663;Clubs card suit
&diams;&#9830;&#x2666;Diamonds card suit
&hearts;&#9829;&#x2665;Hearts card suit
&larr;&#8592;&#x2190;Left arrow
&rarr;&#8594;&#x2192;Right arrow
&uarr;&#8593;&#x2191;Up arrow
&darr;&#8595;&#x2193;Down arrow
 &#9792;&#x2640;Female Indicator
 &#9794;&#x2642;Male Indicator
 &#9833;&#x2669;Quarter Note
 &#9834;&#x266A;Eighth Note
 &#9836;&#x266C;Two Eighth Notes
 &#9837;&#x266D;Flat
 &#9839;&#x266F;Sharp
Format
mla apa chicago
Your Citation
Girard, Jeremy. "HTML Codes for Punctuation and Other Characters." ThoughtCo, Aug. 10, 2016, thoughtco.com/html-codes-punctuation-and-other-characters-4071945. Girard, Jeremy. (2016, August 10). HTML Codes for Punctuation and Other Characters. Retrieved from https://www.thoughtco.com/html-codes-punctuation-and-other-characters-4071945 Girard, Jeremy. "HTML Codes for Punctuation and Other Characters." ThoughtCo. https://www.thoughtco.com/html-codes-punctuation-and-other-characters-4071945 (accessed December 15, 2017).