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

HTML <sub> Tag


Subscript 到文本:

<p>This text contains <sub>subscript</sub> text.</p>
来试试吧 »

Definition and Usage

The <sub> tag defines subscript text. Subscript text appears half a character below the normal line, 有时以较小的字体呈现。 下标文本可用于chemical formulas, like H2O.

Tip: Use the <sup> tag to define superscripted text.

Browser Support

<sub> Yes Yes Yes Yes Yes

Global Attributes

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

Event Attributes

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

Related Pages

HTML tutorial: HTML Text Formatting

HTML DOM reference: Subscript Object

Default CSS Settings

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


sub {
  vertical-align: sub;
  font-size: smaller;
来试试吧 »