Subscript text"; the content in this tag will be displayed in the browser below half the character height in the current text stream as the baseline. It can be used to represent chemical formulas."/> Subscript text"; the content in this tag will be displayed in the browser below half the character height in the current text stream as the baseline. It can be used to represent chemical formulas.">

Home  >  Article  >  Web Front-end  >  Which tag does html5 use to represent subscripts?

Which tag does html5 use to represent subscripts?

青灯夜游
青灯夜游Original
2022-03-11 17:09:483282browse

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.

Which tag does html5 use to represent subscripts?

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>

Which tag does html5 use to represent subscripts?

[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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn