HTML/Elements/sup

From Web Education Community Group
< HTML‎ | Elements
Revision as of 17:16, 22 November 2011 by Hiroki (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

<sup>

The <sup> element represents a superscript.

Point

  • This element must be used only to mark up typographical conventions with specific meanings.


HTML Attributes

See global attributes.


Examples

Example A

Mathematical expressions often use subscripts and superscripts. Authors are encouraged to use MathML for marking up mathematics, but authors may opt to use sub and sup if detailed mathematical markup is not desired [try it]:

<p>f(<var>x</var>, <var>n</var>) = log<sub>4</sub><var>x</var><sup><var>n</var></sup></p>

Sup01.png

HTML Reference

The HTML5 specification defines the <sup> element in 4.6.15 The sub and sup elements.