| Depr. | Empty | Version |
|---|---|---|
| No | No | HTML 2 |
| IE5.5+ | FF1+ | SA1.3+ | OP9.2+ | CH2+ |
|---|---|---|---|---|
| Full | Full | Full | Full | Full |
Syntax
<sub>
</sub>
Description
The sub
element is used to define subscript—text which appears half a character’s
height below the baseline of the line it’s on, and is most often used in
mathematical or chemical formulae.
The example HTML, where the number 2 is defined as subscript, would render on screen as shown in Figure 1.
Figure 1. An example of
sub
Example
Here’s an example of the
sub element used for chemical formulas:
<p>That's not just water. That's not just H<sub>2</sub>O. That's
H<sub>2</sub>-woah!</p>
Use This For …
This element can be applied to any text content, but is likely to be limited to scientific or niche content.
Compatibility
| Internet Explorer | Firefox | Safari | Opera | Chrome | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 5.5 | 6.0 | 7.0 | 8.0 | 1.0 | 1.5 | 2.0 | 3.0 | 3.5 | 1.3 | 2.0 | 3.1 | 4.0 | 9.2 | 9.5 | 10.0 | 2.0 |
| Full | Full | Full | Full | Full | Full | Full | Full | Full | Full | Full | Full | Full | Full | Full | Full | Full |
The
sub element enjoys good browser
support.
User-contributed notes
There are no comments yet.