The HTML <sup> (superscript) tag is used to define a superscript. Any text written in a sup tag will be displayed above normal text. The text will also appear in a smaller size.
This tag is useful for displaying some mathematical equations, chemical formulas or dates.
To display a subscript, use <sub> tag.
Syntax
<sup>Superscript</sup>
Example
<!DOCTYPE html>
<html>
<head>
<title>HTML sup tag</title>
</head>
<body>
<p>7<sup>th</sup> June</p>
</body>
</html>
Output
7th June
Subscribe
Join the newsletter to get the latest updates.