There are several approaches to displaying superscript and subscript text on the Web, and each have their uses depending on your needs.
For most purposes, you can use the <sup></sup> tag to create super script text and <sub></sub> to create sub-script text. See examples below:
Note: Although some Web standards professionals recommend avoiding these tags, they are an official XHTML standard.
You change the CSS attributes of the <sup> and <sub> tags to improve line spacing, formatting and placement of characters. See references below:
Some Web standards professionals recommend using CSS formatting instead the <sup> and <sub> tags on the theory that these tags are "presentational." The disadvantage to this approach is that if a user disables your stylesheet, the superscripts and subscripts will disappear.
However, if you are more comfortable with using the CSS attributes, you can refer to these pages.
Many common superscript and subscript characters have their own Unicode entries and entity codes. If your Web page is generated from a database or meant to be a searchable archive, the use of Unicode values may be preferable.
See updated instructions on the Microsoft Office page.