DEV Community

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

Posted 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 sub - Definition sup | Example | Support sub - Support sup

Discussion (0)