Superscript with HTML

If the other day we saw how to put a subscript in HTML, today we are going to see how to put a superscript in HTML.

This will help us when we have to put things like

on our web pages

E = mc2

20 km2

or when we have to put a reference at the bottom of the page…

…as cited in Code Line1

In this case, to put a superscript with HTML we need the element SUP. This element will contain the superscript between a start tag and a closing tag.

<sup>superindice</sup>

The code necessary to express the above would be the following:

E = mc<sup>2</sup>
20 km<sup>2</sup>

Something really useful and simple.

Leave a Comment