<sub>, <sup>
Subscript (`<sub>`) and superscript (`<sup>`).
Syntax
H<sub>2</sub>O, x<sup>2</sup>Examples
Formulas and footnotes:
<p>Water is H<sub>2</sub>O.</p>
<p>The area is 25 m<sup>2</sup>.</p>
<p>Free delivery<sup><a href="#note1">1</a></sup></p>Notes
Sub- and superscripts slightly increase the line height. If that bothers you, set line-height: 0 on sub and sup in CSS. For complex formulas MathML (<math>) fits better.
See also
- <small> — Fine print for side comments: terms, copyright, footnotes.
- <kbd>, <samp>, <var> — Keyboard input (`<kbd>`), program output (`<samp>`) and a variable in a formula (`<var>`).
In the tutorial
- Text formatting — Inline tags for text — strong and em, mark, del and ins, sub and sup, code, kbd and pre, abbr and q.