HTML5 <sub> and <sup> Tags

Example

Subscript and superscript text:

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

<p>This text contains <sup>superscript</sup> text.</p>

Try it yourself »

Definition and Usage

The <sub> tag defines subscript text. The <sup> tag defines superscript text.


Differences Between HTML 4.01 and HTML5

NONE


Standard Attributes

The <sub> tag also supports the Standard Attributes in HTML5.


Event Attributes

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