Definition
The <sup>
tag is an inline element that displays text as a superscript. The superscript text shows as smaller and with a higher baseline.
Example
<p>The Webmaster said superscript text is cool<sup>1</sup>.</p>
<hr>
<p>1. Said last week on The Webmaster in response to an article.</p>
Usage
- Both the opening and closing tags are required.
- The
<sup>
element should only be used for display purposes to adhere to any typographical conventions or standards. It does not convey any semantic meaning. - It should not be used soley for styling purposes.
- Common uses for
<sup>
elements include:- Displaying footnotes.
- Representing ordinal numbers, such as “1st”
- Mathematical equations, such as “a3 + c4 = 20”
Attributes
The <sup>
element only supports the Global Attributes.
Best Practices
- For marking up mathematical or chemical formulas see the
<sub>
element.
Specification
Browser Support
Desktop
Chrome | Edge | Firefox | IE | Opera | Safari |
---|---|---|---|---|---|
Yes | Yes | Yes | Yes | Yes | Yes |
Mobile
Android Webview | Chrome Android | Firefox Android | Opera Android | iOS Safari | Samsung Internet |
---|---|---|---|---|---|
Yes | Yes | Yes | Yes | Yes | Yes |