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 categories | Flow content, phrasing content, palpable content. |
---|---|
Permitted content | Phrasing content. |
Tag omission | None, both the starting and ending tag are mandatory. |
Permitted parents | Any element that accepts phrasing content. |
Implicit ARIA role | No corresponding role |
Permitted ARIA roles | Any |
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.