HTML/Elements/sub

From W3C Wiki
< HTML‎ | Elements
Revision as of 15:00, 22 July 2011 by Plehegar (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

<sub>

The <sub> element represents a subscript.

Point

  • This element must be used only to mark up typographical conventions with specific meanings.


HTML Attributes

See global attributes.


Examples

Example A

Mathematical expressions often use subscripts and superscripts. Authors are encouraged to use MathML for marking up mathematics, but authors may opt to use sub and sup if detailed mathematical markup is not desired [try it]:

<p>f(<var>x</var>, <var>n</var>) = log<sub>4</sub><var>x</var><sup><var>n</var></sup></p>

Sub01.png

HTML Reference

The HTML5 specification defines the <sub> element in 4.6.15 The sub and sup elements.