HTML special formatting elements like subscript

<html>
<head>
</head>
<body>
<b>This text is bold</b><br>

<strong>This text is important!</strong><br>
<i>This text is italic</i><br>
<em>This text is emphasized</em><br>

<small>This is some smaller text.</small><br>
<p>Do not forget to buy <mark>milk</mark> today.</p><br>

<p>My favorite color is <del>blue</del> red.</p><br>

<p>My favorite color is <del>blue</del> <ins>red</ins>.</p><br>

<p>H<sub>2</sub>O</p><br>
<p>This is <sup>superscripted</sup> text.</p><br>
</body>
</html>

Info on the code is below

HTML Formatting Elements

live demonstration with code
see the link in the description to copy the code

Formatting elements were designed to display special types of text:

<b> – Bold text
<strong> – Important text
<i> – Italic text
<em> – Emphasized text
<mark> – Marked text
<small> – Smaller text
<del> – Deleted text

<b>This text is bold</b>

<strong>This text is important!</strong>
<i>This text is italic</i>
<em>This text is emphasized</em>

<small>This is some smaller text.</small>
<p>Do not forget to buy <mark>milk</mark> today.</p>

<p>My favorite color is <del>blue</del> red.</p>
<p>My favorite color is <del>blue</del> <ins>red</ins>.</p>
<p>This is <sub>subscripted</sub> text.</p>
<p>This is <sup>superscripted</sup> text.</p>

<ins> – Inserted text
<sub> – Subscript text
<sup> – Superscript text

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *