The <sup> tag is used to define the superscript text, which appears half a character above the regular line and is rendered smaller than the rest of the text. The tag is usually used to define footnotes and formulas.
The <sub> tag is used to define the subscript.
The <sup> tag comes in pairs; the content is written between the opening (<sup>) and the closing (</sup>) tags.
<html> <head> <title>Title of the document</title> </head> <body> <p>E = mc<sup>2</sup>, where E is the energy of the object, m is the weight, c is the light speed in vacuum. </p> </body> </html>