sup ElementThe sup element is an inline element declared by the XHTML 1.1 Presentation Module (Inline Presentation)
Elements in the Presentation Module are:big | small | sub | sup | i | b | tt (Inline Presentation Support Module)hr (Block Presentation Support Module)
The text within a sup element should be superscripted.
For example, the code:
1<sup>st</sup> place
is rendered as follows:
1st place
The same effect can be achieved using CSS using the declaration
vertical-align:super if you wish to separate content from presentation.
I would generally use the sup tag if the superscripting were a semantic part of the text
(such as x< for x to the power 4) and the CSS if it were desired for purely presentational reasons
(such as in the example above).sup>4</sup>
See also the sub element.
There are no #REQUIRED attributes on the sup element.
There are no specific attributes declared on the sup element.
sup element are listed below:class [ type NMTOKENS ]id [ type ID ]style [ type CDATA ], from the Style Attribute Module (deprecated)title [ type Text ]xmlns [ type URI - #FIXED 'http://www.w3.org/1999/xhtml' ]dir [ type Enumeration (ltr | rtl) ], from the Bi-directional Text Modulexml:lang [ type LanguageCode ]All attributes in the
Events Attribute Collection
are supported:onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup
sup element is:
( #PCDATA | Inline.mix )*
See Content Model & Nesting for information about Content Model syntax and Nesting Groups.
supabbr, acronym, br, cite, code, dfn, em, kbd, q, samp, span, strong, varabutton, input, label, select, textareaimgb, big, i, small, sub, sup, ttmapnoscript, scriptdel, insbdoobjectrubysupabbr, acronym, address, cite, code, dfn, div, em, h1 - h6, kbd, p, q, samp, span, strong, varadd, dt, licaption, td, thbutton, fieldset, label, legendb, big, i, small, sub, sup, ttdel, insbdoobjectrb, rt