HTML sup Tag

HTML <sup> element is known as a superscript tag that is utilized to specify text displayed in a superscript format. Content enclosed within the <sup> tag is presented with a raised baseline and is displayed in a smaller font size compared to the surrounding text.

The <sup> tag is valuable for specifying mathematical equations and footnotes.

Syntax

Example

<sup>......</sup>

Following are some details regarding the HTML <sup> tag:

Display Inline
Start tag/End tag Both Start and End tag
Usage Textual

Example

Example

<!DOCTYPE html>

<html>

<head>

	<title>HTML sup Tag</title>

	<style>

	   body{

		text-align: center;

		}

	</style>

</head>

<body>

 <h2>Example of sup tag</h2>

  Following is the famous Pythagorean Theorem: 

  <p style="font-size: 20px; color: green;"><var>a</var><sup>2</sup>+<var>b</var><sup>2</sup>=<var>c</var><sup>2</sup>

  </p>

  <p>Where a, b, and c represents the sides of right angle triangle</p>

</body>

</html>

Output:

Attribute:

Tag-specific attributes:

The <sup> tag does not have any particular attribute associated with it.

Global attribute:

The <sup> tag is compatible with the Global attributes within the HTML language.

Event attribute:

The <sup> tag facilitates the utilization of Event attributes within HTML.

Supporting Browsers

Element Chrome IE Firefox Opera Safari
<sup> Yes Yes Yes Yes Yes

Input Required

This code uses input(). Please provide values below: