Learn how to format text in HTML
HTML provides several elements for formatting text. Here are some of the most commonly used ones:
To make text bold, use the <b> or <strong> tag:
<b>This text is bold</b>
<strong>This text is also bold</strong>
To italicize text, use the <i> or <em> tag:
<i>This text is italic</i>
<em>This text is also italic</em>
To underline text, use the <u> tag:
<u>This text is underlined</u>
To strike through text, use the <s> tag:
<s>This text is strikethrough</s>
For superscript, use <sup>. For subscript, use <sub>:
This is <sup>superscript</sup> text
This is <sub>subscript</sub> text
To highlight text, use the <mark> tag:
<mark>This text is highlighted</mark>