CKTIS / HTML
sup — superscript
The `sup` element marks a meaningful superscript, such as an exponent. It is not intended solely for decoration.
Version: WHATWG HTML Living Standard; index snapshot date recorded separately
Syntax
<sup>text</sup>The sup element represents a superscript; sub represents a subscript. Use sup when the text’s position carries meaning, such as an exponent, not merely for appearance.
It accepts phrasing content and global attributes. Both opening and closing tags are mandatory. For more detailed mathematical markup, the standard recommends MathML.
In the example, 3 is the exponent applied to 2. The expression denotes eight; HTML does not perform the calculation.
Examples
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Superscript</title>
</head>
<body>
<p>2<sup>3</sup> = 8</p>
</body>
</html>Result
2³ = 8
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.