Sub html что это

: The Subscript element

The HTML element specifies inline text which should be displayed as subscript for solely typographical reasons. Subscripts are typically rendered with a lowered baseline using smaller text.

Content categoriesFlow content, phrasing content, palpable content.
Permitted contentPhrasing content.
Tag omissionNone, both the starting and ending tag are mandatory.
Permitted parentsAny element that accepts phrasing content.
Implicit ARIA roleNo corresponding role
Permitted ARIA rolesAny
DOM interface HTMLElement

Attributes

This element only includes the global attributes.

Usage notes

The element should be used only for typographical reasons—that is, to change the position of the text to comply with typographical conventions or standards, rather than solely for presentation or appearance purposes.

Appropriate use cases for include (but aren’t necessarily limited to):

Examples

Footnote numbers

Traditional footnotes are denoted using numbers which are rendered in subscript. This is a common use case for :

The resulting output looks like this:

Variable subscripts

In mathematics, families of variables related to the same concept (such as distances along the same axis) are represented using the same variable name with a subscript following. For example:

The resulting output:

Chemical formulas

When writing a chemical formula, such as H20, the number of atoms of a given element within the described molecule is represented using a subscripted number; in the case of water, the subscripted «2» indicates that there are two atoms of hydrogen in the molecule.

Источник

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *