Common Math Symbols in HTML, XML, TeX, and Unicode
Here I list some the symbols that come up frequently in math and describe how to represent them in TeX, HTML, XML, and Unicode.
HTML provides a mnemonic form for 252 of the most common symbols. (See a full list from the W3C.) These are called "character entities." You can simply put Unicode characters directly into an HTML page as long as you have an input method and the content-type of your HTML page is correctly set. However character entities let you specify non-ASCII characters in HTML using only ASCII text.
See notes below
Hex forms
XML
Browser compatibility notes
Other resources
Table of symbols
| Symbol | TeX | Entity | Unicode |
| ± | \pm | ± | x00B1 |
| → | \to | → | x2192 |
| ⇒ | \Rightarrow | ⇒ | x21D2 |
| ⇔ | \Leftrightarrow | ⇔ | x21D4 |
| ∀ | \forall | ∀ | x2200 |
| ∂ | \partial | ∂ | x2202 |
| ∃ | \exists | ∃ | x2203 |
| ∅ | \emptyset | ∅ | x2205 |
| ∇ | \nabla | ∇ | x2207 |
| ∈ | \in | ∈ | x2208 |
| ∉ | \not\in | ∉ | x2209 |
| ∏ | \prod | ∏ | x220F |
| ∑ | \sum | ∑ | x2211 |
| √ | \surd | √ | x221A |
| ∞ | \infty | ∞ | x221E |
| ∧ | \wedge | ∧ | x2227 |
| ∨ | \vee | ∨ | x2228 |
| ∩ | \cap | ∩ | x2229 |
| ∪ | \cup | ∪ | x222A |
| ∫ | \int | ∫ | x222B |
| ≈ | \approx | ≈ | x2248 |
| ≠ | \neq | ≠ | x2260 |
| ≡ | \equiv | ≡ | x2261 |
| ≤ | \leq | ≤ | x2264 |
| ≥ | \geq | ≥ | x2265 |
| ⊂ | \subset | ⊂ | x2282 |
| ⊃ | \supset | ⊃ | x2283 |
| ⋅ | \cdot | ⋅ | x22C5 |
Hex forms
The hex representation of a character in HTML is the Unicode value in hex
with &# added on the left and ; on the right.
For example, the symbol ∞ can be written ∞ or ∞
based on its Unicode value x221E. Internet Explorer 4.01 did not support hex
representations, but all newer browsers do.
XML
Most HTML entities are not legal in XML. You must use the hex representations instead. Note that you can insert other Unicode characters this way, even if they do correspond to an HTML character entity. However, you run the risk of some users not having the necessary fonts installed on their computer.
Browser compatibility notes
The symbols above display correctly in Internet Explorer 4.01 and later with three
exceptions: ∅. ∉, and ⋅
do not work in IE until version 7.
I tested the HTML entities above on a wide variety of browsers and operating systems using Browsershots. Other than the note above about IE prior to IE7, the only problem I saw was that Konqueror 3.5 was unable to display many of the symbols. The image that Browsershots returned for IE 8 was missing some symbols. But when I tested the page on IE 8 Beta 1 myself all symbols were displayed properly.
Other resources
A complete list of LaTeX symbols is available here.
You can find more about Unicode from the Unicode Consortium.
See also Greek letters in HTML, XML, TeX, and Unicode.