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
