sup
Represents superscript text, typically displayed higher and smaller.
Description
The <sup> element specifies inline text which should be displayed as superscript for solely typographical reasons. Superscripts are typically rendered with a raised baseline using smaller text. Common uses include exponents in mathematical expressions, ordinal numbers (like 1st, 2nd), footnote references, and trademark/registered symbols.
Use <sup> only for typographical conventions, not for purely presentational purposes. For styling purposes, use CSS (vertical-align: super).
Basic Example
E = mc2
Mathematical Exponents
Superscripts are essential for mathematical notation:
The area of a circle is A = πr2, where r is the radius.
Ordinal Numbers
Superscripts for ordinal indicators:
The 1st place winner will receive a gold medal, the 2nd place a silver, and 3rd place a bronze.
Footnote References
Superscripts are commonly used for footnote and citation references:
Trademark Symbols
Trademark and registered symbols are often superscripted:
Welcome to Awesome ProductTM — the best solution® for your needs.
Attributes
This element supports global attributes.
Accessibility
Screen readers may not announce superscript formatting. For mathematical notation or footnotes where the superscript is meaningful, ensure the context is clear or provide alternative descriptions. Consider using MathML for complex mathematical expressions.