How to make the text superscript or subscript?


HTML<sub> and <sup> Tag
The text can be defined as subscript using <sub> and superscript using <sup> tags. These tags are much useful in chemical formula and some mathematical equations. Superscript [1] also used on a text line to have a footnote and the Subscript [2] is for scientific formulae.
Example :
This is a <sub>subscript</sub> example
This is a <sup>superscript</sup> example
Result :
This is a subscript example
This is a superscript example

The <sub>,<sup> can also be used along with the CSS.
[1] - Superscript example - E=MC2
[2] - Subscript example - H2O

Ask Questions

Ask Question