How to mark text superscript in HTML?

To mark superscripted text in HTML, use the <sup>…</sup> tag. Just keep in mind both the opening and closing tag is mandatory while using the <sup>...</sup> tag.

The superscript text appears to be half a character above the normal line. It is displayed as a smaller font.

You can try the following code to mark superscripted text in HTML. Here, we are writing the value 2 4 using the <sup> tag,

<!DOCTYPE html>
      <title>HTML text superscript</title>
         Value: 2 <sup>4</sup> = 16


Updated on: 29-Dec-2021

1K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started