HTML <sup> Tag

The HTML sup element is used to describe one or more superscript contents. The sup tag shows a text which is presented above the regular line and half the length of the character. And, this text is simply placed in a smaller font. We can also use the sup tag for representing the Mathematical formulas. Suppose, we want to write 10 to the power of 3, then we can write this using the tiny tag or the sup tag.

It is important to keep in mind that the sup element must be used to define superscript content in HTML documents.

Syntax:

<body>
<p> ……………..
<sup>…………… </sup>
……………. </p>
</body>

Example

Example 1:

This example uses the single sup tag to display the superscript text:

<!DOCTYPE html>
<html>
<head>
<title> html sup tag </ title >
</head>
<body>
<p> This document also contains <sup> some superscript </sup> information in it. </p>
</body>
</html>

Output:

HTML sup Tag

Example 1:

Multiple superscript text can be used in the single document as like the below code:

<!DOCTYPE html >
<html>
<head>
<title> html sup tag < /title >
</head >
<body >
<p> you can use < sup > multiple </sup> superscript tags in a <sup> single document < /sup>. < /p >
</body>
< /html >

Output:

HTML sup Tag

Default CSS Settings

Most of the browsers use CSS part as default to display the superscript text.

Example

sup {
  vertical-align: super;
  font-size: smaller;
}

Browser support:

List of browsers that support html <section> tag are mentioned below:

Chrome: yes

Microsoft edge: yes – version 12 needed

Firefox: yes – version 1 needed

Safari: yes

Opera: yes