Judging by your comments, it looks like you’re specifically asking how to display fractions. If that’s the case, many fractions are defined as HTML entities. As an example, a few of those entities are:
½ ¼ ⅛ ⅔ ⅖ ¾ ⅜
Result:
½ ¼ ⅛ ⅔ ⅖ ¾ ⅜
Note that not all browsers support those named entities, but you could use their Unicode values instead. If you want to be able to display any fraction and not just the ones that have entities, you can use the fraction slash entity, ⁄
( ⁄ ). This character overlaps pixels from the preceding and following characters to make a very neat fraction. It’s best used when combined with superscript and subscript numbers:
<sup>39</sup>⁄<sub>40</sub>
Result:
39⁄40
Further reading:
http://changelog.ca/log/2008/07/01/writing_fractions_in_html
If the font you’re using supports it, you may also be able to paste the subscript and superscript numbers directly into your HTML from an application like charmap.exe. See Konrad Rudolph’s excellent answer for an example.