Tutorials 参考 练习 Videos NEW Menu
Paid Courses Website NEW

HTML <sup> Tag


例子

Superscript 到文本:

<p>This text contains <sup>superscript</sup> text.</p>
来试试吧 »

Definition and Usage

The <sup> tag defines superscript text. Superscript text appears half a character above the normal 有时以较小的字体呈现。上标文本可用于, for footnotes, like WWW[1].

Tip: Use the <sub> tag to define subscript text.


Browser Support

Element
<sup> Yes Yes Yes Yes Yes

Global Attributes

The <sup> tag also supports the Global Attributes in HTML.


Event Attributes

The <sup> tag also supports the Event Attributes in HTML.


Related Pages

HTML tutorial: HTML Text Formatting

HTML DOM reference: Superscript Object


Default CSS Settings

Most browsers will display the <sup> element with the following default values:

例子

sup {
  vertical-align: super;
  font-size: smaller;
}
来试试吧 »