HTML sub tag
HTML <sub> tag defines subscript. sub element is commonly used in equation (Mathematical, Chemical).
Tag Uses
Specific uses of <sub> tagsub element has been used in the equations and formulas.
<var> element should also be used with sub element to write the equations. In the following example, <var> tag is also used.
Preview Example
Try itExample
<p>See the equation of logarithm</p>
<p><var>y</var> = log<sub>a</sub><var>x</var></p>
<p>See the equation of motion</p>
<p><var>v</var><sub>f</sub> = <var>v</var><sub>i</sub> + <var>a</var><var>t</var></p>
<p>The chemical formulas have been given below.</p>
<p>
<var>H</var><sub>2</sub><var>S</var><var>O</var><sub>4</sub>,
<var>H</var><var>N</var><var>O</var><sub>3</sub>,
H<sub>3</sub>PO<sub>4</sub>
</p>
Tag omission
Both starting and ending tags are necessary for the sub element.
Global Attributes
All the global attributes are applicable on the sub element.