Superscript text in HTML is used to raise text above the normal line of text, typically for footnotes, mathematical expressions, and chemical formulas.
<sup>
TagThe <sup>
tag is used to create superscript text in HTML. It raises the text slightly above the baseline and reduces the font size.
<!DOCTYPE html>
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8">
<title>Superscript Text Example</title>
</head>
<body>
<p>This is normal text with a <sup>superscript</sup> example.</p>
<p>Here is a mathematical equation: x<sup>2</sup> + y<sup>2</sup> = z<sup>2</sup></p>
<p>Here is a chemical formula: H<sub>2</sub>O</p>
</body>
</html>