7.5. Superscript, Subscript, Big, and Small Text

The superscript (<sup>) and subscript (<sub>) tags can be used to specify superscript and subscript text. For example, consider the following code and the results shown in Figure 7-5:

<p>This is normal text.</p>
<p>This is the 16<sup>th</sup> day of the month. (superscripted "th")</p>
<p>Water tanks are clearly marked as H<sub>2</sub>O. (subscripted "2")</p>
Figure 7-5. Figure 7-5

The big (<big>) and (<small>) tags are used as you would expect: to delimit text you want rendered bigger or smaller than the default text. For example, consider the following example code and the result shown in Figure 7-6:

<p>This is default text.</p>
<p>This word is <big>bigger</big> than the default text.</p>
<p>This word is <small>smaller</small> than the default text.</p>
Figure 7-6. Figure 7-6

Get Web Standards Programmer's Reference: HTML, CSS, JavaScript®, Perl, Python®, and PHP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.