- Sep 5, 2013
- Adding a Paragraph
- Specifying Fine Print
- Marking Important and Emphasized Text
- Creating a Figure
- Indicating a Citation or Reference
- Quoting Text
- Specifying Time
- Explaining Abbreviations
- Defining a Term
- Creating Superscripts and Subscripts
- Adding Author Contact Information
- Noting Edits and Inaccurate Text
- Marking Up Code
- Using Preformatted Text
- Highlighting Text
- Creating a Line Break
- Creating Spans
- Other Elements
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 . HTML includes elements for defining both kinds of text. Common uses for superscripts include marking trademark symbols, exponents, and footnotes . Subscripts are common in chemical notation.
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.
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
- Type <sub> to create a subscript or <sup> to create a superscript.
- Type the characters or symbols that represent the subscript or superscript.
- Type </sub> or </sup>, depending on what you used in step 1, to complete the element.