Home | All Questions | alt.html FAQ >

How do I show the PI character or tick mark in HTML without using images?

The numeric references for the Greek letter pi are Π for the capital letter, π for the small letter. (See http://www.htmlhelp.com/reference/html40/entities/symbols.html for a list, but note that the symbolic references (entities) like π and Π work less often than the numeric references.)

Note that capital letter pi is not the same as the n-ary product symbol (which historically originates from capital pi and might look similar or even identical to it in some fonts); the numeric reference for the latter is ∏.

The check mark symbol (Unicode character U+2713) is ✓. There's also heavy check mark (U+2714), ✔.

All numeric references &#n; with n > 255 may suffer from lack of browser support. Specifically, some versions of Netscape 4 get them right only if a Unicode encoding is specified. The usual hack for this is to use: <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> but what you should really try to do is to make the server send an actual HTTP header Content-Type: text/html;charset=utf-8 In this approach, _all_ characters other than those in US-Ascii must be presented using numeric references (or entities). More about this: http://ppewww.ph.gla.ac.uk/%7eflavell/charset/quick.html

Moreover, there's the problem that the font in use might not contain glyphs for the characters used. For example, none of the fonts shipped with Windows 98 seems to contain the check mark symbol; on the other hand, users _might_ have installed an additional font that has it. You need to decide whether the use of special characters is important enough to justify the inevitable problems.

Recommended Resources


Related Questions