The sub tag is used in html5 to represent subscripts. The sub tag can define subscript text, with the syntax "Subscript text"; the content in this tag will be displayed in the browser below the baseline, which is half the character height in the current text stream. Can be used to represent chemical formulas.
The operating environment of this tutorial: Windows 7 system, HTML5 version, Dell G3 computer.
In html5, you can use the sub tag to represent subscripts.
The sub tag can define subscript text.
The subscript text will be displayed below the baseline that is half the height of the characters in the current text stream, but the font and size will be the same as the text in the current text stream. Subscripted text can be used to represent chemical formulas.
Syntax:
<sub>下标文本</sub>
If you want to define a superscript, you can use the tag.
Example:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> </head> <body> <p>这个文本包含 <sub>下标</sub>文本。</p> <p>这个文本包含 <sup>上标</sup> 文本。</p> </body> </html>
[Related recommendations: html video tutorial, web front-end】
The above is the detailed content of Which tag does html5 use to represent subscripts?. For more information, please follow other related articles on the PHP Chinese website!