<sub> Tag Syntax

<body>
   ...
   ... phrasing content expected ...<sub>... phrasing content ...</sub>
   ...
</body>
Rules for coding the HTML sub element

Make sure you understand the difference between a tag and element and are familiar with the definitions of namespace and other HTML terms.

  1. Code the sub element for subscript text where phrasing content is expected.
  2. Begin the sub element with a starting <sub> tag. The element name uses lower case letters and should be in the HTML namespace, which it will pick up automatically from the xmlns attribute on the <html> tag.
  3. Include any HTML global attributes on the <sub> tag as appropriate.
  4. Inside the sub element, between the starting <sub> tag and the ending </sub> tag, code the inner HTML phrasing content.
  5. End the sub element with a matching </sub> closing tag.
Content Model
Content of the sub element

The content of the sub element can include HTML comments, text content and only those HTML tags that can be used in phrasing content.