HTML <sup> tag

The <sup> tag is used to define superscript text. Superscript texts are normally rendered with raised baseline and smaller text.

Type: Inline Element

Syntax of <sup> tag

<sup>Superscript text</sup>

Supported Browsers

Tag Chrome Internet Explorer Firefox Safari Opera Mini
<sup> Yes Yes Yes Yes Yes

Full code example

<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>
 If x=10, then x<sup>2</sup>=100.
</p>
</body>
</html>
Run The code »

Output on the browser

If x=10, then x2=100.

More reference

<sup> tag is mostly used in writing the exponent with respect to a base like x2.
It also uses in displaying ordinal number such as 1st, 2nd, 3rd, 4th ........, xn

Default CSS properties of <sup> tag

sup {
  font-size:smaller;
  vertical align:super; or vertical align:20%;
}