Subscripts and Superscripts [12/17]
The next two tags are used to format individual characters rather than words. They are used in measurement units or simple mathematical expressions.
For example, 20m2, H2O, X3 + X2=1
<sup> tag renders text in superscript.
<sub> tag displays text in subscript.
Please note that these tags are purely presentational and have no semantic meaning of their own.
They can be nested inside each other to make up more complex formulas.
However, if you wish to insert a very sophisticated mathematical expression in your HTML document, you'd better use a special markup language called MathML.
- Format the first formula as follows:
- and the second formula as:
sin2x + cos2x = 1.
- For the third formula, find proper formatting yourself.
- The fourth formula is even more sophisticated: make your own try.