HTML Codes for Punctuation and Other Characters

Silhouette of a man standing in front of code and special characters

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 web page and expect them to appear. To use these characters, you must add the codes for them to your site's HTML markup. 

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.

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.

HTML Punctuation Special Characters

Display Friendly Code Numerical Code Hex Code Description
Horizontal Tab
Line Feed
Space
! ! ! ! Exclamation Point
" " " " Double Quote
# # # # Number Sign
& & & & Ampersand
' ' ' ' Single Quote
( ( ( ( Left Parenthesis
) ) ) ) Right Parenthesis
* * * * Asterisk (Star)
, , , , Comma
- - - - Hyphen
. . . . Period
/ / / / Forward Slash
: : : : Colon
; ; ; ; Semi-Colon
? ? ? ? Question Mark
@ @ @ @ At Sign
[ [ [ [ Left Square Bracket
\ \ \ \ Back Slash
] ] ] ] Right Square Bracket
^ ^ ^ ^ Caret
_ _ _ _ Underscore
{ { { { Left Curly Brace
| | | | Vertical Bar
} } } } Right Curly Brace
~ ˜ ~ ~ Vertical Bar
Single Low Quote
&dbquo; Double Low Quote
Elipsis
Dagger
Double Dagger
Left Single Angle Quote
Left Single Quote
Right Single Quote
Left Double Quote
Right Double Quote
Small Bullet
En Dash
Em Dash
Trademark
Right Single Angle Quote
Non-Breaking Space
¡ ¡ ¡ ¡ Inverted Exclamation Point
¦ ¦ ¦ ¦ Broken Vertical Bar
© © © © Copyright
ª ª ª ª Feminine Ordinal Indicator
« « « « Left Angle Quote
¬ ¬ ¬ ¬ Not Sign
­ ­ ­ ­ Soft Hyphen
® ® ® ® Registered Symbol
° ° ° ° Degree
² ² ² ² Superscript 2
³ ³ ³ ³ Superscript 3
µ µ µ µ Micro Sign
Pilcrow (Paragraph Sign)
· · · · Middle Dot
¹ ¹ ¹ ¹ Superscript 1
º º º º Masculine Ordinal Indicator
» » » » Right Angle Quote
¿ ¿ ¿ ¿ Inverted Question Mark
Care Of
Superscript N
§ § § § Section Mark
¨ ¿ ¿ ¿ Inverted Question Mark
Horizontal Bar
Triangle Bullet
Overline
Double Exclamation Point
Number Word

Other Character Codes

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

Display Friendly Code Numerical Code Hex Code Description
Spade card suit
Clubs card suit
Diamonds card suit
Hearts card suit
Left arrow
Right arrow
Up arrow
Down arrow
Female Indicator
Male Indicator
Quarter Note
Eighth Note
Two Eighth Notes
Flat
Sharp