HTML Formatting

HTML provides several tags for text formatting. These tags help you make text bold, italic, underlined, highlighted, and more.

Example


<b>Bold text</b>
<strong>Important text</strong>

<i>Italic text</i>
<em>Emphasized text</em>

<small>Smaller text</small>
<mark>Highlighted text</mark>

<del>Deleted text</del>
<ins>Inserted text</ins>

<sup>Superscript text</sup>
<sub>Subscript text</sub>

Output in Browser

Bold text

Important text

Italic text

Emphasized text

Smaller text

Highlighted text

Deleted text

Inserted text

H2O → Subscript

25 = 32 → Superscript

Tip: Use <strong> and <em> instead of <b> and <i> for better accessibility and SEO, because they add semantic meaning.