Text Content

HTML <sup> element

Marks typographic superscripts where the raised position carries meaning, such as mathematical exponents. Use sup for meaningful raised notation, such as an exponent or ordinal where appropriate. It is not intended for arbitrary vertical positioning of interface elements. It accepts global HTML attributes; individual global features may be inapplicable or restricted.

Formal Syntax & Structure

html syntaxhtml
<sup>Superscript</sup>

Return Value

HTMLElement

Content model: Phrasing content, with element-specific restrictions.

Working Example

Example Snippethtml
<!doctype html><html lang="en">  <head>    <meta charset="utf-8">    <title>HTML example</title>  </head>  <body>    <p>      2      <sup>3</sup>      = 8    </p>  </body></html>
HTML Reference