Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Web Design & Development > HTML/XHTML

  • Print
  • + Share This
This chapter is from the book

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 red-a.jpg. HTML includes elements for defining both kinds of text. Common uses for superscripts include marking trademark symbols, exponents, and footnotes red-b.jpg. Subscripts are common in chemical notation.

red-a.jpg One use of the sup element is to indicate footnotes. I placed the footnotes in a footer within the article rather than in the page at large because they are associated. I also linked each footnote number within the text to its footnote in the footer so visitors can access them more easily. Note, too, that the title attribute on the links provides another cue.


Click to view larger image

red-b.jpg The sup elements display higher than text in the same line. In the process, unfortunately, they change the spacing between lines (see the last tip).

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 represent the subscript or superscript.
  3. Type </sub> or </sup>, depending on what you used in step 1, to complete the element.
  • + Share This
  • 🔖 Save To Your Account