sup element represents a superscript.
Authors must refrain from using this element merely for presentational purposes. The meaning of the document should be altered if the element is removed.
Although this element is useful for small formulas, authors are encouraged to use the more appropriate MathML, to mark up mathematical expressions.
The following example shows a very famous formula in a sentence. The
sup element is being used to mark up the exponent inside the formula, while
var is properly wrapping the variables.
<p>It's going to be a key moment in history, like when Albert Einstein presented his formula <var>E</var>=<var>m</var><var>c</var><sup>2</sup>.</p>
It's going to be a key moment in history, like when Albert Einstein presented his formula E=mc2.
The next example shows another mathematical expression where the
sup element is wrapping the exponent.
<p>Do you think the number 5000<sup>-1</sup> is grater than 1?</p>
Do you think the number 5000-1 is grater than 1?
For information about global attributes refer to this list of global attributes in HTML5.
For information about global events refer to this list of global events in HTML5.