sub element

If you don't know what an element is or how you must use it, I recommend you read the "HTML tags and attributes" tutorial that you can find in the HTML tutorials section.

Description

The sub element represents a subscript.

Authors must refrain from using this element merely for presentational purposes. The meaning of the document should be altered if the element is removed.

Although this element is useful for small formulas, authors are encouraged to use the more appropriate MathML, to mark up mathematical expressions.

Examples

The first example, shows part of a statement in an electronics exam. There, the sub element represents the subscript part of the resistance input/output variables. The var element is properly used to wrap the variables.

<p>Find <var>R<sub>in</sub></var> and <var>R<sub>out</sub></var> of the Bipolar Junction Transistor.</p>

Find Rin and Rout of the Bipolar Junction Transistor.

Now, the author makes some notes about a mathematical problem presented elsewhere in the document. The sub element is used to mark up the variable's subscripts.

<p>Being <var>X<sub>0</sub></var> greater that 0 we can conclude there's at least one possible solution for this equation.</p>

Being X0 greater that 0 we can conclude there's at least one possible solution for this equation.

Attributes

Global attributes

For information about global attributes refer to this list of global attributes in HTML5.

Events

Global events

For information about global events refer to this list of global events in HTML5.