Character Entities


Character entities, like escape codes, allow you to insert characters even if you cannot type them in directly. Simply insert the code where you want the character to appear.

There are three characters which must be put in as codes: & < >
The ampersand (&) indicates the start of an entity, the left angle bracket (<) indicates the start of an HTML tag, and the right angle bracket (>) indicates the end of an HTML tag. While these may show up properly in some browsers without escaping them, they don't in all. Besides that, they may ruin your code.

Any time a double quote (") appears in an attribute value, it must be escaped; otherwise, the parser thinks that's the end of the attribute's value.

note: letter codes are case-sensitive.

Avoid using the number codes; they are not very portable. Also, if there's a problem with the letter codes, at least the reader can guess at what's supposed to be there.

& < > = ± + × ÷ - ­ _ ¬ · ¯ ~ ´ ` ¨ ¸ ^ µ ' " &laqo; &raqo; ( ) [ ] { } / \ | &brkbar; : ; , . ! ? ¿ ¡ ¹ ² ³ &fraq14; &fraq12; &fraq34; * # % ° $ ¢ £ ¥ ¤ § © ® @ ª º   [no-break space]

Character Numerical Code Letter Code
(if applicable)
Name of Character
& &#38; &amp; ampersand
< &#60; &lt; less than sign/left angle bracket
> &#62; &gt; greater than sign/right angle bracket
= &#61;   equals sign
± &#177; &plusmn; plus-or-minus sign
+ &#43;   plus sign
× &#215; &times; multiplication sign
÷ &#247; &divide; division sign
- &#45;   hyphen/minus sign
­ &#173; &shy; soft hyphen
_ &#95;   underscore/horizontal bar (on baseline)
¬ &#172; &not; not sign
· &#183; &middot; middle dot
¯ &#175; &macr;   &hibar; macron accent
~ &#126;   tilde
´ &#180; &acute; acute accent
` &#96;   backquote/grave accent
¨ &#168; &uml;   &die; umlaut/dieresis
¸ &#184; &cedil; cedilla
^ &#94;   caret/circumflex
&#182; &para; Paragraph sign
µ &#181; &micro; micro sign/Greek letter "mu"
' &#39;   apostrophe
" &#34; &quot; quotation mark
« &#171; &laqo; left angle quote/guillemet left
» &#187; &raquo; right angle quote/guillemet sign
( &#40;   left parentheses
) &#41;   right parentheses
[ &#91;   left bracket
] &#93;   right bracket
{ &#123;   left brace
} &#125;   right brace
/ &#47;   slash/solidus
\ &#92;   backslash/reverse solidus
| &#124;   vertical bar/pipe
¦ &#166; &brvbar;   &brkbar; broken vertical bar
: &#58;   colon
; &#59;   semicolon
, &#44;   comma
. &#46;   period
! &#33;   exclamation mark
? &#63;   question mark
¿ &#191; &iquest; inverted question mark
¡ &#161; &iexcl; inverted exclamation
¹ &#185; &sup1; superscript one
² &#178; &sup2; superscript two
³ &#179; &sup3; superscript three
¼ &#188; &fraq14; one-fourth
½ &#189; &fraq12; one-half
¾ &#190; &fraq34; three-fourths
* &#42;   asterisk
# &#35;   hash mark/pound sign/number sign
% &#37;   percent sign
° &#176; &deg; degree sign
$ &#36;   dollar sign
¢ &#162; &cent; cent sign
£ &#163; &pound; pound sterling
¥ &#165; &yen; yen sign
¤ &#164; &curren; general currency sign
§ &#167; &sect; section sign
© &#169; &copy; copyright
® &#174; &reg; registered trademark
@ &#64;   at sign/commercial at
ª &#170; &ordf; feminine ordinal
º &#186; &ordm; masculine ordinal
  &#160; &nbsp; non-breaking space
  &#32;   space
  &#09;   Horizontal Tab
  &#10;   Line Feed-This and the Horizontal Tab (&#09;) don't work in HTML because all whitespace collapses to a space anyway.