HTML Tutorial: Superscript
- In an HTML document, the opened and closed superscript tags must be placed before and after the designated superscript text. When placing the <sup> and </sup> tags around the selected text, make sure to include the backslash in the closed </sup> tag in order to assign an end point to the superscript formatting. Otherwise, the Web document will display more items than wanted as superscript text, thus interfering with the entire document's format when viewed in a Web browser.
The best practice for superscript text is to keep it concise and to only use it when necessary. Long strings of text set as a superscript can appear awkward to the eye and interfere with the visual flow of a document. - Combining HTML and CSS (Cascading Style Sheet) can give more control over the output of superscripts in a Web document, but it is a more complicated endeavor. The process involves two steps: creating the style class in the CSS and designating the superscript text in the HTML document. The class tag in the CSS must be given the attributes of "vertical-align: super" to function correctly. It is important to use the same class specified in the CSS to designate the text in the HTML, or else the output will not be with the desired style. Using CSS, any superscript text that is output using the class tag can have a specific color, size, font and padding.
- Superscript text creates easier readability for text that contains numbers as fractions, such as cooking recipes and mathematics problems. Also, for math equations, superscript text distinguishes squares, cubes and other powers in a much more succinct manner as opposed to writing out an entire story problem. HTML superscripts can be used in online documents to identify footnotes and terms to be elaborated further below the body text area. In addition, superscripts are great for trademark symbols.
Designating Superscript Text
HTML and CSS
HTML Superscript Uses
Source...