HTML <sup> Tag
Topic: HTML5 Tags ReferencePrev|Next
Description
The <sup> (short for superscript) tag renders enclosed text as superscript.
Superscript text appears half a character's height above the baseline, and is most often used in mathematical (e.g. y = x2), or scientific formulas (e.g. E = mc2).
The following table summarizes the usages context and the version history of this tag.
| Placement: | Inline |
|---|---|
| Content: | Inline and text |
| Start/End Tag: | Start tag: required, End tag: required |
| Version: | HTML 3.2, 4, 4.01, 5 |
Usage Notes
- The
<sup>tag should be used for typographical reasons only. - This tag must not be used for styling purpose like changing the vertical position of the text. In that case CSS should be used instead: the
vertical-alignproperty with thesupervalue will achieve the same effect.
Syntax
The basic syntax of the <sup> tag is given with:
The example below shows the <sup> tag in action.
Example
Try this code »<p>The equation of mass�energy equivalence is: E=mc<sup>2</sup></p>
Tag-Specific Attributes
The <sup> tag doesn't have any specific attribute.
Global Attributes
Like all other HTML tags, the <sup> tag supports the global attributes in HTML5.
Event Attributes
The <sup> tag also supports the event attributes in HTML5.
Browser Compatibility
The <sup> tag is supported in all major modern browsers.
Basic Support—
|
Further Reading
See tutorial on: HTML Text Formatting.
Related tag: <sub>.

