# sub, sup element

Type: | Text Characteristics
Attributes: | color • font-family • font-feature-settings • font-stretch • font-style • font-variant • font-weight • font • justification-ratio • letter-spacing • outline-color • outline-width • overprint • requote • suppress-ligatures • text-decoration • text-transform • align • background-color • background-image-dpi • background-image-position • background-image • background-pdf • border-color • border-style • border-width • border • clear • corner-radius • display • float • font-size • height • href • left • line-cap • line-height • line-join • margin • onmouseover • overflow • padding • page-break-after • page-break-inside • position • rotate • size • top • vertical-align • visibility • white-space • width • class • colorspace • direction • id • lang
See: | span

The sup tag displays text as a superscript, and the sub tag displays it as subscript. The exact position and size of super/sub-scripted text is defined by the font. The two elements are equivalent to <span font-size="subscript" vertical-align="super"> and <span font-size="subscript" vertical-align="sub"> respectively.

    <p>Einstein insists that E=MC<sup>2</sup></p>
    <p>Remember that H<sub>2</sub>O is safe to drink, while H<sub>2</sub>SO<sub>4</sub> is not</p>