HTML <sub> Tag

Description

The <sub> HTML element defines subscript text. You can combine this with <sup> for superscripts and subscripts in formulas. In a text browser not compatible with the <sub> tag, it is displayed as ordinary characters.

Properties

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

Example

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

Attributes

None

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

Desktop
Explorer Edge Chrome Firefox Opera Safari
YesYesYes1YesYes
Tablets / Mobile
Android Chrome Firefox Opera Safari Samsung
YesYes4YesYesYes

Last updated by CSSPortal on: 6th December 2019