HTML <sup> Tag
- The HTML
<sup>
tag is used to define superscript text. - Superscript text appears half a character above the normal line and used to denote powers or exponents.
Syntax
The basic syntax of the HTML tag is:
<sup>Superscript</sup>
<sup>
tag is used to define superscript text.The basic syntax of the HTML tag is:
<sup>Superscript</sup>
Let's see an example of how to use the HTML <sup>
tag:
The HTML <sup>
tag is a non-container tag which means it doesn't have an opening and closing tag. It is used to place superscript text in HTML. When we enclose any text or number within the tags, it is displayed in superscript format.
The HTML <sup>
tag is commonly used to show powers in math equations or reference numbers such as footnote references.
Example:
Einstein's famous equation: E=mc<sup>2</sup>
<sup>
tag can only be used within text and it does not affect the line-height or spacing of the adjacent text elements.<sup>
tag is typically reserved for mathematical or scientific formulae, footnotes, and superscript text.The HTML <sup>
tag is a simple and useful tag in HTML that makes it easy to display superscript text. It is used to raise the text to a higher position than the rest of the line. Enclosing text or a number within the <sup>
</sup>
tags is all that is required and it is widely used when writing mathematical expressions or scientific documents.