# Greek letters in HTML, XML, TeX, and Unicode

Greek letters are simple to represent in HTML and TeX. In both systems, the code for a letter is essentially its name. The letter name is capitalized to get the capitalized form. HTML surrounds the letter name with an ampersand and semicolon. TeX prefixes the name with a backslash. For example, in HTML, λ is &lambda; and Λ is &Lambda;. In TeX these are \lambda and  \Lambda.

HTML and Unicode distinguish between Roman letters and Greek letters that look similar. For example, the English letter “A” has Unicode value x41, but the Greek letter Alpha has Unicode value x391. TeX, however, only provides symbols for Greek letters that do not look like their English counterparts. TeX also has alternate versions of some Greek letters [1].

See note below about representing Greek letters in XML [2].

## Capital Greek letters

LetterTeXEntityUnicode
Α&Alpha;x391
Β&Beta;x392
Γ\Gamma&Gamma;x393
Δ\Delta&Delta;x394
Ε&Epsilon;x395
Ζ&Zeta;x396
Η&Eta;x397
Θ\Theta&Theta;x398
Ι&Iota;x399
Κ&Kappa;x39A
Λ\Lambda&Lambda;x39B
Μ&Mu;x39C
Ν&Nu;x39D
Ξ\Xi&Xi;x39E
Ο&Omicron;x39F
Π\Pi&Pi;x3A0
Ρ&Rho;x3A1
Σ\Sigma&Sigma;x3A3
Τ&Tau;x3A4
Υ\Upsilon&Upsilon;x3A5
Φ\Phi&Phi;x3A6
Χ&Chi;x3A7
Ψ\Psi&Psi;x3A8
Ω\Omega&Omega;x3A9

Note that the Unicode numbers above are consecutive with one exception: there is no Unicode character x3A2 between Ρ and Σ. The reason is given below. [3]

## Lower-case Greek letters

LetterTeXEntityUnicode
α\alpha&alpha;x3B1
β\beta&beta;x3B2
γ\gamma&gamma;x3B3
δ\delta&delta;x3B4
ε\epsilon&epsilon;x3B5
ζ\zeta&zeta;x3B6
η\eta&eta;x3B7
θ\theta&theta;x3B8
ι\iota&iota;x3B9
κ\kappa&kappa;x3BA
λ\lambda&lambda;x3BB
μ\mu&mu;x3BC
ν\nu&nu;x3BD
ξ\xi&xi;x3BE
ο&omicron;x3BF
π\pi&pi;x3C0
ρ\rho&rho;x3C1
ς\varsigma&sigmaf;x3C2
σ\sigma&sigma;x3C3
τ\tau&tau;x3C4
υ\upsilon&upsilon;x3C5
φ\phi&phi;x3C6
χ\chi&chi;x3C7
ψ\psi&psi;x3C8
ω\omega&omega;x3C9

## Notes

[1] TeX also has several variations on Greek letters that are commonly used in mathematics: \varepsilon, \vartheta, \varpi, \varrho, and \varphi.

[2] HTML entities are illegal in XML and but legal in XHTML. XML applications require a numeric encoding of Greek letters. (You can simply put Unicode characters directly into your HTML page provided you set your content-type correctly. However, character entities and hexidecimal encodings allow you to represent non-ASCII symbols using only ASCII characters.) You can create an XML numeric encoding from a Unicode character by adding &# on the left and ; on the right, such as &#x393; for Γ, Unicode value x393.

[3] The Unicode value of a lower-case Greek letter is the value of its upper-case counterpart plus x20. However, there is one complication. Greek has two forms of the lower-case sigma:  ς used only as the final letter of a word and the more familiar σ used everywhere else. That’s why there is no upper-case character x3A2 corresponding to the lower-case x3C2. The letter ς is an exception to the rule that HTML entities and TeX command sequences simply use the name of the Greek letter.