This website uses cookies

We use cookies to personalize content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you've provided to them or that they've collected from your use of their services. Please read more at our privacy policy page.

HTML <sub> Tag

The <sub> tag is used to define subscript text that appear half a character below the line, and is rendered in a smaller font. Subscript text is often used for defining chemical formulas.

To define superscript text, use the <sup> tag.


The content of the tag is between the opening (<sub>) and the closing (</sub>) tags.


<!DOCTYPE html>
    <title>Title of the document</title>
    <p>Formula of water - H<sub>2</sub>O,  formula of alcohol - C<sub>2</sub>H<sub>5</sub>ОН</p>



The <sub> tag supports the Global attributes and the Event Attributes.

Browser support