Subscripts and superscript in Html

Subscript text

<sub> tag defines subscript text
Subscript text appears half a character below the normal line, and is sometimes rendered in a smaller font.
Subscript text can be used to represent chemical formulas, eg.H2O


Superscript text

<sup>tag defines superscript text.
Superscript text appears half a character above the normal line, and sometimes rendered in smaller font.
Superscript text can be used to represent footnotes, eg. 52

Example:

<!DOCTYPE html>
<html>
<head>
<title>Insert and Delete tag</title>
</head>

<body>
Here is subscript=x<sub>2</sub><br>
Here is superscript=x<sup>2</sup><br>
</body>
</html>

Output of this code will look like this: