DEV Community

Cover image for HTML tags | sub-sup
Carlos Espada
Carlos Espada

Posted on • Updated on

HTML tags | sub-sup

They are used to create subscripts and superscripts, for example in mathematical or chemical formulas, to indicate footnotes, in abbreviations in some languages (Mademoiselle) or certain ordinals (4th).

The included text is usually displayed in a smaller font and either below (subscript) or above (superscript) the baseline of the rest of the text.

It should not be used to alter the baseline of a text for purely aesthetic reasons, as in a logo, in that case CSS will have to be used.

  • Type: inline
  • Self-closing: No
  • Semantic value: No

Definition and example <sub> - Definition and example <sup> | Support <sub> - Support <sup>

Top comments (0)