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