<sup> tag

HTML <sup> tag

The <sup> tag is used to show superscript.

Normally, you should use this for showing scientific and mathematical formulas.

The text inside this element appears at the top of its normal position from the baseline.

And, this will appear almost half of its original size in the browser.

Syntax:
<sup>text…</sup>

Example

<p>(a+b)<sup>2</sup>= a<sup>2</sup>+ 2ab + b <sup>2</sup></p>

CSS Alternative

vertical-align: super;
font-size: smaller;

How Browser will display

INLINE.

Difference between HTML4.01, XHTML and HTML5

HTML4 XHTML HTML5
None None None

Attributes used with <sup> tag

NONE

Global Attributes

The <sup> tag supports Global attributes.

Event Attributes

The <sup> tag supports Event attributes.

Supporting Browsers

supporting-browsers for tags

Related Tags

<sub> tag.

Tutorials for all brains!