View video tutorial

HTML <sub> Tag


The <sub> tag defines subscript text.

HTML <sub> Tag

The subscript text displays half a character below the normal line.

Subscripts are usually rendered with a lowered baseline using smaller text.

Subscripts are widely used in chemistry or similar fields.

Global attributes

Global attributes may be applied on all elements, although some elements may have no effect on them.

<accesskey>, <class>, <contenteditable>, <contextmenu>, <data-*>, <dir>, <draggable>, <dropzone>, <hidden>, <id>, <lang>, <spellcheck>, <style>, <tabindex>, <title>, <translate>.

Learning with HTML Editor "Try it Now"

You can edit the HTML code and view the result using online editor.


<p>This is an example of <sub>subscript</sub> text.</p>
<p>Example: H<sub>2</sub>O, H<sub>2</sub>SO<sub>4</sub></p>
Try it Now »

Click on the "Try it Now" button to see how it works.