HTML superscript is a tag that can be used to create text that appears slightly above the normal line of text. This is useful for things like mathematical formulas or chemical equations.
To create superscript text, simply enclose the text you want to appear in superscript within the <sup>
and </sup>
tags. For example:
This is normal text.
Normal text. <sup>This is superscript text.</sup> This is normal text again.
Here’s how it will look:
Normal text. This is superscript text. This is normal text again.
As you can see, the superscript text appears slightly above the normal text, and is a bit smaller in size.
You can also use the HTML <sub>
tag to create subscript text, which appears slightly below the normal line of text.