English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Referenzhandbuch

Vollständiges Verzeichnis der HTML-Tags

HTML: <sub> Tag

HTML <sub>-Tag definiert den Unterzeiltext in einem HTML-Dokument. Zum Beispiel in der chemischen Formel CO 2in2Wird als Unterzeile dargestellt, die eine kleinere Schriftgröße und eine niedrigere Baseline hat. Dieses Tag wird auch oft als <sub>-Element bezeichnet.

Online-Beispiel

Demonstration der Unterzeile in chemischen Molekülformeln:

!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>HTML sub-Tag verwenden (Basis-Tutorial-Webseite oldtoolbag.com)</title>
</head>
<body>
   <h1>Demonstration of subscript in chemical molecular formulas</h1>
<p>The chemical formula for ammonia is NH<sub>3</sub>.</p>
</body
</html>
Test to see ‹/›

In this HTML5In the document example, we used the <sub> tag to define NH 3Chemical formula.3Rendered as smaller text, half the height of other text.

Browser Compatibility

IEFirefoxOperaChromeSafari

All mainstream browsers support the <sub> tag.

Tag definition and usage instructions

<sub> Tag defines subscript text. Subscript text will be displayed below the baseline of the current text flow at half the height of the current text flow characters, but with the same font and size as the current text flow text. Subscript text can be used to represent chemical formulas, such as H2O.

Hint: Please use <sup> Tag defines superscript text.

HTML 4.01 And HTML5Differences Between

None.

Global Attributes

Support for <sub> Tag Global Attributes of HTML.

Event Attributes

Support for <sub> Tag HTML Event Attributes.