HTML Code for Common Symbols

Use HTML codes to ensure accuracy between web coding and web rendering

HashTag Sign
jayk7 / Getty Images

HTML uses special codes to support content for common symbols not found on keyboards, as well as in situations where the symbol itself serves a dual purpose in HTML as both a control character and a display character.

To add a letter, number, or special symbol to the displayed text of a webpage, use either the HTML number or the HTML name of the symbol.

For example, one way to display the text ¡Buenos días! using HTML codes is:

¡Buenos días 

This approach isn't easily parsed by human eyes in the HTML source document, but you're guaranteed that the result will render correctly on the page, whereas merely pasting the already-formatted text may not.

Notice that these codes begin with an ampersand? In strictly compliant HTML, instead of writing something like Jane likes the bed & breakfast you'd instead write:

Jane likes the bed & breakfast

or

Jane likes the bed & breakfast

This practice avoids confusion related to the use of a raw ampersand within the HTML document.

In the tables that follow, you'll see that every entry features an HTML number and a subset feature an HTML name. Either the name or the number works. Some commonly used symbols use an easier-to-remember name to facilitate HTML development—remembering & is easier for most web developers than remembering &.

HTML Codes for Symbols and Punctuation

The most commonly used HTML codes relate to symbols and punctuation:

SymbolHTML NumberHTML NameCommon Name
   space
!! exclamation point
"""double quotes
## number sign
$$ dollar sign
%% percent sign
&&&ampersand
'' single quote
(( opening parenthesis
)) closing parenthesis
** asterisk
++ plus sign
,, comma
-- minus sign - hyphen
.. period
// slash
:: colon
;&#59; semicolon
<&#60;&lt;less than sign
=&#61; equal sign
>&#62;&gt;greater than sign
?&#63; question mark
@&#64; at symbol
[&#91; opening bracket
\&#92; backslash
]&#93; closing bracket
^&#94; caret - circumflex
_&#95; underscore
`&#96; grave accent
{&#123; opening brace
|&#124; vertical bar
}&#125; closing brace
~&#126; equivalency sign - tilde
 &#160;&nbsp;non-breaking space
¡&#161;&iexcl;inverted exclamation mark
¢&#162;&cent;cent sign
£&#163;&pound;pound sign
¤&#164;&curren;currency sign
¥&#165;&yen;yen sign
¦&#166;&brvbar;broken vertical bar
§&#167;&sect;section sign
¨&#168;&uml;spacing diaeresis - umlaut
©&#169;&copy;copyright sign
ª&#170;&ordf;feminine ordinal indicator
«&#171;&laquo;left double angle quotes
¬&#172;&not;not sign
­&#173;&shy;soft hyphen
®&#174;&reg;registered trade mark sign
¯&#175;&macr;spacing macron - overline
°&#176;&deg;degree sign
±&#177;&plusmn;plus-or-minus sign
²&#178;&sup2;superscript two - squared
³&#179;&sup3;superscript three - cubed
´&#180;&acute;acute accent - spacing acute
µ&#181;&micro;micro sign
&#182;&para;pilcrow sign - paragraph sign
·&#183;&middot;middle dot - Georgian comma
¸&#184;&cedil;spacing cedilla
¹&#185;&sup1;superscript one
º&#186;&ordm;masculine ordinal indicator
»&#187;&raquo;right double angle quotes
¼&#188;&frac14;fraction one quarter
½&#189;&frac12;fraction one half
¾&#190;&frac34;fraction three quarters
¿&#191;&iquest;inverted question mark
×&#215;&times;multiplication sign
÷&#247;&divide;division sign

HTML Codes for Numerals

HTML supports codes for most of the common Latin symbols, including figures and letters. You'd use an HTML code for a numeral when you're displaying the number-as-number on the page and not part of a formula.

SymbolHTML NumberHTML NameCommon Name
0&#48; zero
1&#49; one
2&#50; two
3&#51; three
4&#52; four
5&#53; five
6&#54; six
7&#55; seven
8&#56; eight
9&#57; nine

HTML Codes for Unaccented Letters

The standard upper-case and lower-case letters also map to HTML numbers, and you'd use them in similar circumstances as for numerals.

LetterHTML Number
A&#65;
B&#66;
C&#67;
D&#68;
E&#69;
F&#70;
G&#71;
H&#72;
I&#73;
J&#74;
K&#75;
L&#76;
M&#77;
N&#78;
O&#79;
P&#80;
Q&#81;
R&#82;
S&#83;
T&#84;
U&#85;
V&#86;
W&#87;
X&#88;
Y&#89;
Z&#90;
a&#97;
b&#98;
c&#99;
d&#100;
e&#101;
f&#102;
g&#103;
h&#104;
i&#105;
j&#106;
k&#107;
l&#108;
m&#109;
n&#110;
o&#111;
p&#112;
q&#113;
r&#114;
s&#115;
t&#116;
u&#117;
v&#118;
w&#119;
x&#120;
y&#121;
z&#122;

HTML Codes for Accented Letters

Codes for accented letters get more use because there's no guarantee that embedding the actual symbol within a page will display correctly. Because HTML source code is parsed by a browser before it's displayed, and because individual viewers of the webpage may use different fonts and encoding schemes depending on the default language of their browser, the best way to ensure accurate reproduction of these accented letters is to rely on the HTML number or the HTML name.

SymbolHTML NumberHTML NameCommon Name
À&#192;&Agrave;latin capital letter A with grave
Á&#193;&Aacute;latin capital letter A with acute
Â&#194;&Acirc;latin capital letter A with circumflex
Ã&#195;&Atilde;latin capital letter A with tilde
Ä&#196;&Auml;latin capital letter A with diaeresis
Å&#197;&Aring;latin capital letter A with ring above
Æ&#198;&AElig;latin capital letter AE
Ç&#199;&Ccedil;latin capital letter C with cedilla
È&#200;&Egrave;latin capital letter E with grave
É&#201;&Eacute;latin capital letter E with acute
Ê&#202;&Ecirc;latin capital letter E with circumflex
Ë&#203;&Euml;latin capital letter E with diaeresis
Ì&#204;&Igrave;latin capital letter I with grave
Í&#205;&Iacute;latin capital letter I with acute
Î&#206;&Icirc;latin capital letter I with circumflex
Ï&#207;&Iuml;latin capital letter I with diaeresis
Ð&#208;&ETH;latin capital letter ETH
Ñ&#209;&Ntilde;latin capital letter N with tilde
Ò&#210;&Ograve;latin capital letter O with grave
Ó&#211;&Oacute;latin capital letter O with acute
Ô&#212;&Ocirc;latin capital letter O with circumflex
Õ&#213;&Otilde;latin capital letter O with tilde
Ö&#214;&Ouml;latin capital letter O with diaeresis
Ø&#216;&Oslash;latin capital letter O with slash
Ù&#217;&Ugrave;latin capital letter U with grave
Ú&#218;&Uacute;latin capital letter U with acute
Û&#219;&Ucirc;latin capital letter U with circumflex
Ü&#220;&Uuml;latin capital letter U with diaeresis
Ý&#221;&Yacute;latin capital letter Y with acute
Þ&#222;&THORN;latin capital letter THORN
ß&#223;&szlig;latin small letter sharp s - ess-zed
à&#224;&agrave;latin small letter a with grave
á&#225;&aacute;latin small letter a with acute
â&#226;&acirc;latin small letter a with circumflex
ã&#227;&atilde;latin small letter a with tilde
ä&#228;&auml;latin small letter a with diaeresis
å&#229;&aring;latin small letter a with ring above
æ&#230;&aelig;latin small letter ae
ç&#231;&ccedil;latin small letter c with cedilla
è&#232;&egrave;latin small letter e with grave
é&#233;&eacute;latin small letter e with acute
ê&#234;&ecirc;latin small letter e with circumflex
ë&#235;&euml;latin small letter e with diaeresis
ì&#236;&igrave;latin small letter i with grave
í&#237;&iacute;latin small letter i with acute
î&#238;&icirc;latin small letter i with circumflex
ï&#239;&iuml;latin small letter i with diaeresis
ð&#240;&eth;latin small letter eth
ñ&#241;&ntilde;latin small letter n with tilde
ò&#242;&ograve;latin small letter o with grave
ó&#243;&oacute;latin small letter o with acute
ô&#244;&ocirc;latin small letter o with circumflex
õ&#245;&otilde;latin small letter o with tilde
ö&#246;&ouml;latin small letter o with diaeresis
ø&#248;&oslash;latin small letter o with slash
ù&#249;&ugrave;latin small letter u with grave
ú&#250;&uacute;latin small letter u with acute
û&#251;&ucirc;latin small letter u with circumflex
ü&#252;&uuml;latin small letter u with diaeresis
ý&#253;&yacute;latin small letter y with acute
þ&#254;&thorn;latin small letter thorn
ÿ&#255;&yuml;latin small letter y with diaeresis
Œ&#338; latin capital letter OE
œ&#339; latin small letter oe
Š&#352; latin capital letter S with caron
š&#353; latin small letter s with caron
Ÿ&#376; latin capital letter Y with diaeresis
ƒ&#402; latin small f with hook - function
Format
mla apa chicago
Your Citation
Roeder, Linda. "HTML Code for Common Symbols." ThoughtCo, Nov. 18, 2021, thoughtco.com/html-code-for-common-symbols-and-signs-2654021. Roeder, Linda. (2021, November 18). HTML Code for Common Symbols. Retrieved from https://www.thoughtco.com/html-code-for-common-symbols-and-signs-2654021 Roeder, Linda. "HTML Code for Common Symbols." ThoughtCo. https://www.thoughtco.com/html-code-for-common-symbols-and-signs-2654021 (accessed March 19, 2024).