Creating Superscripts and Subscripts

Letters or numbers that are raised or lowered slightly relative to the main body text are called superscripts and subscripts, respectively. (X)HTML includes tags for defining both kinds of offset text.

To create superscripts or subscripts:

1.
Type <sub> to create a subscript or <sup> to create a superscript.
2.
Type the characters or symbols that you wish to offset relative to the main text.
3.
Type </sub> or </sup>, depending on what you used in step 1, to complete the offset text.
Figure 4.15. The opening sup or sub tag precedes the text to be affected.

✓ Tips

  • Most browsers automatically reduce the ...

Get HTML, XHTML, & CSS, Sixth Edition: Visual QuickStart Guide 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.