HTML <sub>Tag


Examples

Subscript text:

<p>This text contains <sub>subscript</sub> text.</p>

Try it Yourself »

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the <sub> tag.


Definition and Usage

The <sub> tag defines subscript text. Subscript text appears below the baseline at half the character height of the current text flow, but with the same font and font size as the text in the current text flow. Subscript text can be used to represent chemical formulas, such as H2O。

Tip:Please use<sup>the <sup> tag to define superscript text.


Differences Between HTML 4.01 and HTML5

None.


Global Attributes

The <sub> tag supportsHTML Global Attributes。


Event Attributes

The <sub> tag supportsHTML Event Attributes。

Other Extensions