Path // www.yourhtmlsource.comReference → <sup>

<sup>


The <sup> element specifies inline text that should be displayed as superscript. Superscript text appears half a character above the normal line and is rendered in a smaller font. It is commonly used for exponents, ordinal numbers, footnote markers, and trademark symbols.

Clock This page was last updated on 2025-11-17



Syntax

<sup>superscript text</sup>

The element requires both opening and closing tags. The content is rendered as superscript text above the baseline.

Attributes

  • Global attributes - The <sup> element supports all global attributes such as id, class, style, lang, and dir.

The <sup> element has no element-specific attributes.

Examples

Mathematical Exponent

<p>The equation is E = mc<sup>2</sup>.</p>

Ordinal Numbers

<p>The race finishes on the 21<sup>st</sup> of March.</p>

Footnote Reference

<p>This claim has been disputed<sup><a href="#fn1">1</a></sup> by several researchers.</p>

Trademark Symbol

<p>Welcome to SuperBrand<sup>&trade;</sup> products.</p>

When to Use

Use the <sup> element when:

  • Writing mathematical exponents (x2, 103)
  • Marking ordinal indicators (1st, 2nd, 3rd)
  • Creating footnote or citation references
  • Adding trademark (TM), registered (R), or copyright symbols
  • Displaying proper typographical conventions requiring superscript

Important: Only use <sup> for semantic superscript purposes where the superscript has meaning. Do not use it purely for visual styling - use CSS for that instead:

span.superscript { vertical-align: super; font-size: smaller; }

  • <sub> - For subscript text (below the baseline)
  • <var> - For variables in mathematical or programming contexts
  • <code> - For code fragments
  • <small> - For small print and side comments