HTML <sup> tag

The <sup> tag is used to define the superscript text, which appears half a character above the normal line and is rendered smaller than the rest of the text. The tag is usually used to define footnotes and formulas.

The <sub> tag is used to define the subscript.

Syntax

The <sup> tag comes in pairs; the content is written between the opening (<sup>) and the closing (</sup>) tags.

Example

<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
  </head>
  <body>
    <p>E = mc<sup>2</sup>, where E is the energy of the object, m is the weight, c is the light speed in vacuum. </p>
  </body>
</html>

Result

Attributes

The <sup> tag supports Global attributes and the Event Attributes.

Browser support