<sub>


HTML <sub> Tag

Instance

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title>php中文网(php.cn)</title> 
</head>
<body>

<p>这个文本包含 <sub>下标</sub>文本。</p>
<p>这个文本包含 <sup>上标</sup> 文本。</p>

</body>
</html>

Run Example»

Click the "Run Instance" button to view the online instance


Browser support

1000.png

All major browsers support< sub> tag.


Tag definition and usage instructions

<sub> Tag definition subscript text. Subscripted text will be displayed below the baseline that is half the height of the characters in the current text stream, but in the same font and size as the text in the current text stream. Subscripted text can be used to represent chemical formulas, such as H2O.

Tip: Please use the <sup> tag to define superscript text.


Differences between HTML 4.01 and HTML5

None.


Global attributes

<sub> tag supports HTML global attributes.


Event attributes

<sub> tag supports HTML event attributes.