HTML Tags

HTML <sup> Tag

The <sup> tag in HTML is used to display superscript text, which appears smaller and slightly above the baseline of normal text.
It is commonly used in mathematical powers, chemical notation, footnotes, or references.
It is an inline element.

Syntax

html

<sup>Superscript text</sup>

Attributes

AttributeDescription
classAssigns one or more class names for styling.
idAssigns a unique identifier to the element.
styleAdds inline CSS styles to customize appearance.
titleProvides additional information as a tooltip.

Example

html

<!DOCTYPE html>
<html>
<head>
  <title>SUP Tag Example</title>
  <style>
    .exponent {
      color: #2c3e50;
      font-size: 0.9em;
    }
  </style>
</head>
<body>
  <h1>HTML <sup> Tag Example</h1>
  <p>
    Mathematical example: 5<sup class="exponent" id="power" title="Superscript">2</sup> = 25
  </p>
  <p>
    Footnote example: The term “HTML”<sup>1</sup> stands for Hypertext Markup Language.
  </p>
</body>
</html>

Output

Browser Output

html

Use our TryIt Editor to see the output.

Browser Support

Chrome
Edge
Firefox
Safari
Opera
IE9+
YesYesYesYesYesYes

The <sup> tag displays text slightly above the baseline, making it suitable for exponents, footnotes, and reference numbers.

Notes

  • <sup> is an inline element and does not break the line.
  • Often paired with <sub> for scientific or mathematical notation.
  • CSS can adjust font size, color, or spacing for superscript text.
  • Ideal for exponents, footnotes, or references rather than normal text.

Conclusion

The <sup> tag is used for superscript text, such as exponents, footnotes, or references.
It visually raises the text above the baseline, providing correct formatting for technical and academic content.