HTML sub Tag

HTML<sub>Tag: The HTML<sub> tag specifies subscript text. And the HTML sub tag defines subscript text. Subscript text appears half a character below the normal line and is sometimes rendered in a smaller font. Subscript text can be used for chemical formulas, like H2O to be written as H2O.

HTML<sub>Tag

This HTML sub tag supports both the global and the event attributes. Both HTML 4 and HTML 5 supports <sub> tag.

Syntax: <sub> Text </sub>

Browser compatibility

The HTML<sub>tag is supported by  different types of browsers.

  • Chrome
  • Firefox
  • Opera
  • Safari
  • Internet explorer

Example:

<!DOCTYPE html>
<html>
<body>
<p>Hello <sub>subscript</sub> world.</p>
</body>
</html>

Output:

 html sub tag