In HTML the <sub> tag is used to display a text as subscript.Subscript are usually rendered with a lowered baseline and smaller text, Subscript text can be used for chemical formulas, like NH3.
<!DOCTYPE html>
<html>
<body>
<p>a<sub>2</sub></p>
<p>b<sub>2</sub></p>
<p>a<sub>2</sub>+ b<sub>2</sub></p>
</body>
</html>