From http://www.w3schools.com (Copyright Refsnes Data)

HTML <sub> and <sup> tags


Example

Subscript and superscript text:

<p>This text contains <sub>subscript</sub> text.</p>

<p>This text contains <sup>superscript</sup> text.</p>

Try it yourself!


Definition and Usage

The <sub> tag defines subscript text. Subscript text appears half a character below the baseline. Subscript text can be used for chemical formulas, like H2O.

The <sup> tag defines superscript text. Superscript text appears half a character above the baseline. Superscript text can be used for footnotes, like WWW[1].


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The <sub> and <sup> tags are supported in all major browsers.


Differences Between HTML and XHTML

NONE


Standard Attributes

id, class, title, style, dir, lang, xml:lang

For a full description, go to Standard Attributes.

Event Attributes

onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

For a full description, go to Event Attributes.


From http://www.w3schools.com (Copyright Refsnes Data)