Formatting Text in HTML Pages

The Web Book

Example 1

A mathematical square expression 32 = 9 and 42 = 16 written using superscript.
A chemical formula H2O written using subscript.

Example 2

New Inspiron All-in-One PC
Price: $599.99 $499.99


HTML Text Formatting Example Code

<!DOCTYPE html> <html> <body> <p><b>Example 1</b></p> <p> A <b>mathematical square</b> expression 3<sup>2</sup> = 9 and 4<sup>2</sup> = 16 written using <i>superscript</i>. <br> A <b>chemical formula</b> H<sub>2</sub>O written using <i>subscript</i>. </p> <p><b>Example 2</b></p> <p>New Inspiron All-in-One PC <br> Price: <s>$599.99</s> $499.99</p> </body> </html> Back