Special Character Escape Table

Character Decimal Escape Character
" " "
& & &
< &#60; &lt;
> &#62; &gt;
Non-breaking space &#160; &nbsp;

Most Common Escape Characters List

Display Description Entity Name Decimal Code
Half-width space &ensp; &#8194;
Full-width space &emsp; &#8195;
Non-breaking space &nbsp; &#160;
< Less than &lt; &#60;
> Greater than &gt; &#62;
& Ampersand &amp; &#38;
" Double quote &quot; &#34;
© Copyright &copy; &#169;
® Registered trademark &reg; &#174;
Trademark &trade; &#8482;
× Multiplication sign &times; &#215;
÷ Division sign &divide; &#247;

ISO 8859-1 (Latin-1) Character Set

Display Name Decimal Display Name Decimal Display Name Decimal Display Name Decimal Display Name Decimal
&nbsp; &#160; ! &iexcl; &#161; c &cent; &#162; lb &pound; &#163; ¤ &curren; &#164;
yen &yen; &#165; | &brvbar; &#166; § &sect; &#167; ¨ &uml; &#168; (c) &copy; &#169;
a &ordf; &#170; << &laquo; &#171; not &not; &#172; &shy; &#173; (R) &reg; &#174;
&macr; &#175; ° &deg; &#176; ± &plusmn; &#177; ^2 &sup2; &#178; ^3 &sup3; &#179;
' &acute; &#180; u &micro; &#181; P &para; &#182; · &middot; &#183; , &cedil; &#184;
^1 &sup1; &#185; o &ordm; &#186; >> &raquo; &#187; 1/4 &frac14; &#188; 1/2 &frac12; &#189;
3/4 &frac34; &#190; ? &iquest; &#191; `A &Agrave; &#192; 'A &Aacute; &#193; ^A &Acirc; &#194;
~A &Atilde; &#195; "A &Auml; &#196; A &Aring; &#197; AE &AElig; &#198; C &Ccedil; &#199;
`E &Egrave; &#200; 'E &Eacute; &#201; ^E &Ecirc; &#202; "E &Euml; &#203; `I &Igrave; &#204;
'I &Iacute; &#205; ^I &Icirc; &#206; "I &Iuml; &#207; D &ETH; &#208; ~N &Ntilde; &#209;
`O &Ograve; &#210; 'O &Oacute; &#211; ^O &Ocirc; &#212; ~O &Otilde; &#213; "O &Ouml; &#214;
× &times; &#215; O &Oslash; &#216; `U &Ugrave; &#217; 'U &Uacute; &#218; ^U &Ucirc; &#219;
"U &Uuml; &#220; 'Y &Yacute; &#221; Th &THORN; &#222; ss &szlig; &#223; à &agrave; &#224;
á &aacute; &#225; ^a &acirc; &#226; ~a &atilde; &#227; "a &auml; &#228; a &aring; &#229;
ae &aelig; &#230; c &ccedil; &#231; è &egrave; &#232; é &eacute; &#233; ê &ecirc; &#234;
"e &euml; &#235; ì &igrave; &#236; í &iacute; &#237; ^i &icirc; &#238; "i &iuml; &#239;
d &eth; &#240; ~n &ntilde; &#241; ò &ograve; &#242; ó &oacute; &#243; ^o &ocirc; &#244;
~o &otilde; &#245; "o &ouml; &#246; ÷ &divide; &#247; o &oslash; &#248; ù &ugrave; &#249;
ú &uacute; &#250; ^u &ucirc; &#251; ü &uuml; &#252; 'y &yacute; &#253; th &thorn; &#254;
"y &yuml; &#255;

Symbols, Mathematical Symbols, and Greek Letters symbols, mathematical symbols, and Greek letters

Display Name Code Display Name Code Display Name Code Display Name Code Display Name Code
f &fnof; &#402; Α &Alpha; &#913; Β &Beta; &#914; Γ &Gamma; &#915; Δ &Delta; &#916;
Ε &Epsilon; &#917; Ζ &Zeta; &#918; Η &Eta; &#919; Θ &Theta; &#920; Ι &Iota; &#921;
Κ &Kappa; &#922; Λ &Lambda; &#923; Μ &Mu; &#924; Ν &Nu; &#925; Ξ &Xi; &#926;
Ο &Omicron; &#927; Π &Pi; &#928; Ρ &Rho; &#929; Σ &Sigma; &#931; Τ &Tau; &#932;
Υ &Upsilon; &#933; Φ &Phi; &#934; Χ &Chi; &#935; Ψ &Psi; &#936; Ω &Omega; &#937;
α &alpha; &#945; β &beta; &#946; γ &gamma; &#947; δ &delta; &#948; ε &epsilon; &#949;
ζ &zeta; &#950; η &eta; &#951; θ &theta; &#952; ι &iota; &#953; κ &kappa; &#954;
λ &lambda; &#955; μ &mu; &#956; ν &nu; &#957; ξ &xi; &#958; ο &omicron; &#959;
π &pi; &#960; ρ &rho; &#961; &sigmaf; &#962; σ &sigma; &#963; τ &tau; &#964;
υ &upsilon; &#965; φ &phi; &#966; χ &chi; &#967; ψ &psi; &#968; ω &omega; &#969;
? &thetasym; &#977; ? &upsih; &#978; ? &piv; &#982; o &bull; &#8226; &hellip; &#8230;
&prime; &#8242; &Prime; &#8243; &oline; &#8254; / &frasl; &#8260; &weierp; &#8472;
I &image; &#8465; R &real; &#8476; TM &trade; &#8482; &alefsym; &#8501; &larr; &#8592;
&uarr; &#8593; &rarr; &#8594; &darr; &#8595; <-> &harr; &#8596; &crarr; &#8629;
<= &lArr; &#8656; &uArr; &#8657; => &rArr; &#8658; &dArr; &#8659; <=> &hArr; &#8660;
&forall; &#8704; &part; &#8706; &exist; &#8707; &empty; &#8709; &nabla; &#8711;
&isin; &#8712; &notin; &#8713; &ni; &#8715; &prod; &#8719; &sum; &#8721;
- &minus; &#8722; * &lowast; &#8727; &radic; &#8730; &prop; &#8733; &infin; &#8734;
&ang; &#8736; &and; &#8743; &or; &#8744; &cap; &#8745; &cup; &#8746;
&int; &#8747; &there4; &#8756; ~ &sim; &#8764; &cong; &#8773; &asymp; &#8776;
&ne; &#8800; &equiv; &#8801; &le; &#8804; &ge; &#8805; &sub; &#8834;
&sup; &#8835; &nsub; &#8836; &sube; &#8838; &supe; &#8839; &oplus; &#8853;
&otimes; &#8855; &perp; &#8869; · &sdot; &#8901; ? &lceil; &#8968; ? &rceil; &#8969;
? &lfloor; &#8970; ? &rfloor; &#8971; ? &lang; &#9001; ? &rang; &#9002; &loz; &#9674;
&spades; &#9824; &clubs; &#9827; &hearts; &#9829; &diams; &#9830;

Important International Characters markup-significant and internationalization characters

Display Name Code Display Name Code Display Name Code Display Name Code Display Name Code
" &quot; &#34; & &amp; &#38; < &lt; &#60; > &gt; &#62; OE &OElig; &#338;
oe &oelig; &#339; S &Scaron; &#352; s &scaron; &#353; "Y &Yuml; &#376; ^ &circ; &#710;
~ &tilde; &#732; &ensp; &#8194; &emsp; &#8195; &thinsp; &#8201; &zwnj; &#8204;
&zwj; &#8205; &lrm; &#8206; &rlm; &#8207; &ndash; &#8211; &mdash; &#8212;
&lsquo; &#8216; &rsquo; &#8217; &sbquo; &#8218; &ldquo; &#8220; &rdquo; &#8221;
&bdquo; &#8222; + &dagger; &#8224; &Dagger; &#8225; &permil; &#8240; < &lsaquo; &#8249;
> &rsaquo; &#8250; EUR &euro; &#8364;

Why Use Escape Sequences?

In HTML, characters such as <, >, and & have special meanings (< and > are used for tags, & is used for escaping) and cannot be used directly. These symbols are not displayed on the web page we see in the end. So, what should we do if we want to display these symbols on the web page?

This is where HTML escape sequences come in.

Escape sequences, also known as character entities, have two reasons for being defined in HTML: The first reason is that symbols like "<" and ">" are already used to represent HTML tags, so they cannot be used directly as symbols in the text. To use these symbols in an HTML document, their escape sequences must be defined. When the interpreter encounters such sequences, it interprets them as the actual characters. When entering escape sequences, it is important to strictly follow the rules of letter case. The second reason is that some characters are not defined in the ASCII character set, so escape sequences are needed to represent them.

Composition of Escape Sequences

Escape sequences, or character entities, are divided into three parts: The first part is an & symbol, called the ampersand in English; the second part is the entity name or a # followed by the entity number; the third part is a semicolon.

For example, to display the less-than sign (<), you can write &lt; or &#60;.

The advantage of using entity names is that they are more understandable; at a glance, lt probably suggests "less than." However, their disadvantage is that not all browsers support the latest entity names. Entity numbers, on the other hand, can be processed by all browsers.

Note: Entity names are case-sensitive.

Remark: The same symbol can be referenced using both "entity name" and "entity number." The advantage of the "entity name" is that it is easier to remember, but it cannot guarantee that all browsers can recognize it smoothly, while the "entity number" does not have this concern, but it is not convenient to remember.

How to Display Spaces?

Under normal circumstances, HTML automatically trims excess spaces. No matter how many spaces you add, they are considered as one space. For example, if you add 10 spaces between two words, HTML will trim 9 spaces and only keep one. To add spaces on the web page, you can use &nbsp; to represent a space.

PS: For those who need to perform escape operations on strings, you can use this tool 【Online HTML Escape/Unescape Tool