liveBook · Manning

Sup element

As explained in Web Design Playground, Second Edition

The HTML sup element marks text as a superscript positioned partially above the text baseline.

The HTML sup element marks text as superscript: the browser displays it smaller and partially above the surrounding text baseline. It is useful for mathematical formulas and footnote markers. section 16.1

Use sup when the raised position carries meaning:

  • Mark a footnote reference, such as [1]. section 16.1
  • Represent superscript notation in a mathematical formula. section 16.1
  • Do not use subscript or superscript merely for typographical presentation. section 16.1

A footnote marker

The warning appears here<sup>[1]</sup>. The browser raises the [1] above the baseline and reduces its size. section 16.1

The W3C standard cautions us not to use subscripts and superscripts "for typographical presentation for presentation's sake."<sup>[1]</sup>

See the rendered example contrasting meaningful superscript use with the caution against using it only for visual styling. section 16.1

How Web Design Playground, Second Edition covers it

How deep it goes
Defines the element, describes its browser rendering, shows uses, and cautions against decorative superscripting.
Examples
Shows a superscript footnote marker and a standards caution against purely typographical use.
What you can do after
Apply the sup element to meaningful mathematical notation and footnote markers.
How it connects
Connects superscript with subscript, mathematical formulas, footnotes, and typographical presentation.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Web Design Playground, Second Edition. The section links point to the parts of the book it draws on.