Signup/Sign In
PUBLISHED ON: FEBRUARY 22, 2021

HTML Sub Tag

In HTML, the <sub> tag stands for the Subscripted tag.

  • The <sub> tag is used to specify inline text which should be displayed as the subscript for solely typographical reasons.

  • The content inside <sub> tag is typically rendered with a lowered baseline using smaller text.

  • The <sub> tag is used to denote the Chemical formulas of any elements.

  • Also, this is an Inline element.

HTML <sub> Tag Syntax and Usage

The <sub> tag requires the start(opening) tag and end(closing) tag.

<sub>
..content here
</sub>

HTML <sub> Tag Basic Example

Given below is a basic example to show the usage of <sub> tag:

HTML <sub> Tag Attributes

This element does not have any specific attributes although this element supports Global and Event attributes.

Default CSS Settings for HTML <sub> Tag

Most of the Browsers use these default CSS Settings:

sub {
  vertical-align: sub;
  font-size: smaller;
}

Browser Support for HTML <sub> Tag

Following browsers support this attribute:

  • Google Chrome 9.0

  • Internet Explorer 11.0

  • Firefox 4+

  • Opera

  • Safari



About the author:
Aspiring Software developer working as a content writer. I like computer related subjects like Computer Networks, Operating system, CAO, Database, and I am also learning Python.