HTML sub tag

Html <sub> tag defines subscript. sub element is commonly used in equation (Mathematical, Chemical).

Example

 <p>See the equation of logarithm</p>
 <p>y = log<sub>a</sub>x</p>

Try </>

sub 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.

Example

See the equation of logarithm

y = logax

See the equation of motion

vf = vi + at

The chemical formulas have been given below.

H2SO4, HNO3, H3PO4

Try </>

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.



Was this article helpful?

 

Email:

Message:

Get the newsletter