HTML <sub> Tag


The <sub> HTML tag is used to define subscript text within the content of a web page. Subscript text is typically displayed in a smaller font size and positioned slightly lower than the surrounding text. It is commonly employed in scientific and mathematical notations, chemical formulas, footnotes, and other instances where characters or numbers need to be represented in a lower position, such as in H₂O to denote water's molecular formula, where "2" is in subscript. The <sub> tag helps maintain proper formatting and readability by ensuring that the subscripted content is visually distinct from the rest of the text.


Permitted Parents
Any element that accepts phrasing content
Inline and text
Start/End Tags
Start tag: required, End tag: required


The chemical formula for water is h<sub>2</sub>0



Global Attributes

The <sub> tag also supports the Global Attributes in HTML5

Event Attributes

The <sub> tag also supports the Event Attributes in HTML5

Browser Support

The following table will show you the current browser support for the HTML <sub> tag.

Edge Chrome Firefox Opera Safari
Tablets / Mobile
Chrome Firefox Opera Safari Samsung Webview

Last updated by CSSPortal on: 30th September 2023