HTML sup Tag
The HTML <sup>
tag is used to mark text that should be displayed as superscript, which means it appears slightly above the normal text baseline. Superscript text is commonly used for mathematical exponents, footnotes, references, and other similar notations.
Here’s an example of how the <sup>
tag can be used:
<p>E = mc<sup>2</sup></p>
In the above example, the <sup>
tag is used to display the number “2” as superscript, indicating that it is an exponent in the famous equation E = mc².
The <sup>
tag can be used with any text or alphanumeric characters to create superscripted content. It is typically rendered in a smaller font size and positioned slightly above the normal text baseline.
It’s important to note that the appearance of superscripted text may vary depending on the browser and the font used. Some browsers may render it as smaller and raised text, while others may adjust the font size and positioning differently.
By using the <sup>
tag appropriately, you can indicate superscripted content in your HTML documents, ensuring accurate representation of mathematical notations, footnotes, or other similar elements that require a raised positioning.