List of Valid HTML Escape Characters
In this article, I will list almost all the valid escape characters used in HTML/XHTML. This topic may be seems odd as this web site is a Linux Technical blog, but I faced this issue when writing my articles web pages. Each time I write an option starting with “‐‐” it appears in my blog as this “—“. This is a big issue for my visitors when they try my examples on a Linux systems, it returns error with “invalid options“. The solution I found is instead of writing double dash symbols in my posts I write it’s equivalent escape character twice, and the problem is solved. I decided to include the list of the valid escape characters here for all Sysadmins who writing a technical posts. Hopefully this will save you some time when creating/ formatting your web pages.
HTML escape character lists often include characters between 128 and 159 – the problem is that these are Microsoft specific, and are reserved for control characters in the standard Internet character sets. In HTML they are undefined, and in XHTML they are completely invalid. Here is a list of valid HTML/XHTML escape characters you should use.
Table of HTML Escape Characters
Decimal Value (&#DV;) | Escape Character | Output |
0 – 031 | None | Nothing |
032 | &sp; or ␣ | Blank |
033 | ! | ! |
034 | " | “ |
035 | # | # |
036 | $ | $ |
037 | % | % |
038 | & | & |
039 | ' | ‘ |
040 | ( | ( |
041 | ) | ) |
042 | * | * |
043 | + | + |
044 | , | , |
045 | ‐ or − or ‐ | – |
046 | . | . |
047 | / | / |
048-057 = digits 0-9 | ||
058 | : | : |
059 | ; | ; |
060 | < | < |
061 | = | = |
062 | > | > |
063 | ? | ? |
064 | @ | @ |
065 – 090 = letters A – Z | ||
091 | [ | [ |
092 | \ | \ |
093 | ] | ] |
094 | ˆ or ⁁ | ^ |
095 | _ | _ |
096 | None (grave accent/back apostrophe) | ` |
097 – 122 = letters a – z | ||
123 | { | { |
124 | | | | |
125 | } | } |
126 | ˜ or ∼ | ~ |
127 | None (delete) | None |
128 – 159 = unused (MS specific) | ||
160 | | non-breaking space |
161 | ¡ | ¡ |
162 | ¢ | ¢ |
163 | £ | £ |
164 | ¤ | ¤ |
165 | ¥ | ¥ |
166 | ¦ or &brkbar; | ¦ |
167 | § | § |
168 | ¨ or ¨ | ¨ |
169 | © | © |
170 | ª | ª |
171 | « | « |
172 | ¬ | ¬ |
173 | ­ (soft hyphen) | None |
174 | ® | ® |
175 | ¯ or &hibar; | ¯ |
176 | ° | ° |
177 | ± | ± |
178 | ² | ² |
179 | ³ | ³ |
180 | ´ | ´ |
181 | µ | µ |
182 | ¶ | ¶ |
183 | · | · |
184 | ¸ | ¸ |
185 | ¹ | ¹ |
186 | º | º |
187 | » | » |
188 | ¼ | ¼ |
189 | ½ or ½ | ½ |
190 | ¾ | ¾ |
191 | ¿ | ¿ |
Hopefully you found this list of HTML escape characters useful. Note that not all lists published on the Internet will validate as valid HTML and XHTML. In some cases, if you’re editing in a plain text (i.e. no formatting is applied) environment, the use of an escape character is not necessary. This is the case with characters such as the apostrophe (‘), hyphen (-), quote (“), and others located as keys on your keyboard.
I hope this article is good enough for you.
See you in other articles.
If You Appreciate What We Do Here On Mimastech, You Should Consider:
- Stay Connected to: Facebook | Twitter | Google+
- Support us via PayPal Donation
- Subscribe to our email newsletters.
- Tell other sysadmins / friends about Us - Share and Like our posts and services
We are thankful for your never ending support.