The <sup> element marks inline text that should appear as a superscript for typographical reasons. Browsers typically raise the baseline and use slightly smaller text.
Good fits: exponents (x2), ordinals (5th), and superior lettering in some languages. For lowered text use <sub>. For decoration-only raising use CSS vertical-align, not <sup>.
Baseline · Widely available.
Not deprecated and not experimental. Stable across modern browsers since about July 2015.
Typography, not decoration.
Use <sup> when convention calls for a superscript. Do not use it only to raise letters in a logo or heading.
Syntax
HTML Syntax
syntax.html
<sup>superscript text</sup>
Both start and end tags are required. Content is phrasing content (text and inline elements).
Reference
Attributes
<sup> has no element-specific attributes. Use globals when needed:
You may restyle sup with CSS, but keep it clearly raised so exponents and ordinals stay readable.
Frequently Asked Questions
The sup element marks inline text that should appear as a typographical superscript — for example exponents, ordinal suffixes, or superior lettering in some languages.
Visually they can look similar. Use sup when the superscript is part of typographical convention. Use CSS when you only want a raised look for decoration or branding.
sub lowers text (subscript). sup raises text (superscript). Pick the one that matches the convention — for example H2O uses sub; x² uses sup.
No. sup only supports the global attributes, such as class, id, and lang.
No. That is presentation. Style the logo with CSS (for example vertical-align) instead of sup.
Yes. A common math pattern is <var>x<sup>2</sup></var> for a squared variable.