When writing in HTML, the tag is an inline element used to designate subscript text, which appears lower, and usually smaller, than the text around it. It is useful for tasks like writing mathematical or chemical formulas. The following sections contain information about this tag, including an example of it in use, and related attributes and browser compatibility.
Example of code
This chemical formula for ammonia is NH3.
Example result
This chemical formula for ammonia is NH3.
For superscript text, use the tag.
- Example of code
- Example result
- Attributes
- Compatibility
- Related information
Attributes
Within an HTML tag, an attribute dictates certain aspects of an HTML element. Attributes are made up of a name and value pair. While the tag does not have any unique attributes, it does utilize all of the standard attributes.
Compatibility
Browser, Compatibility, Container tag, Web design terms
Related information
- How to change the text line spacing.
- How to center text in HTML.
- HTML and web design help and support.