HTML / HTML Tags

HTML <Sup> Tag

Dec 12, 2022
1 min read
HTML sup Tag

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

ChromeEdgeFirefoxIEOperaSafari
YesYesYesYesYesYes

Mobile

Android WebviewChrome AndroidFirefox AndroidOpera AndroidiOS SafariSamsung Internet
YesYesYesYesYesYes