Skip to content
Tutorials Center
My learning

Topics

HTML Reference ยท Inline Text

The <sup> element

Reference for the HTML <sup> element: exponents, footnote markers and abbreviations that convention writes in superscript, with examples and technical details.

The <sup> element marks text that must appear as a superscript because of a typographic convention: exponents, footnote markers, and abbreviations such as the French "Mlle" or "1er". The browser raises the text above the baseline and makes it smaller.

HTML
<p>The area of the square is 9 m<sup>2</sup>.</p>

Try it

Superscripts

The footnote marker is a link inside <sup>, and the note links back to it, so readers can move between the two.

Attributes

This element has no attributes of its own. It accepts the global attributes.

Usage notes

  • Meaning, not decoration. Use <sup> only where the raised position carries meaning. In "210" it changes the number completely. For purely visual raising, use CSS vertical-align: super.
  • <sup> vs <sub>. <sub> lowers text instead, for chemical formulas and indexes.
  • Ordinals in English. "1st" and "21st" don't need <sup>; plain text is correct and easier to read.
  • Symbols. Trademark and registered signs already exist as characters (โ„ข and ยฎ), so you don't need <sup>TM</sup>.
  • Footnotes. A superscript number linking to a note is a common pattern. Give the link an accessible name if the number alone is unclear, for example with aria-label="Footnote 1".
  • Serious math. For more than simple powers, use MathML.
  • Line spacing. Superscripts can push lines apart; sup { line-height: 0; } usually fixes it.

Technical summary

Content categories Flow content, phrasing content, palpable content
Permitted content Phrasing content
Tag omission None; both the start and end tags are required
Permitted parents Any element that accepts phrasing content
Implicit ARIA role superscript
DOM interface HTMLElement
Default display inline (with vertical-align: super and font-size: smaller)

Browser support

Supported in every browser.