Text Formatting in HTML
Text formatting in HTML allows you to style text by making it bold, italic, underlined, highlighted, and more. HTML provides various tags to format text.
Common Text Formatting Tags
| Tag | Description | Example |
|---|---|---|
<b> | Bold text (without emphasis) | <b>Bold Text</b> |
<strong> | Bold text (with importance) | <strong>Important Text</strong> |
<i> | Italic text (without emphasis) | <i>Italic Text</i> |
<em> | Italic text (with emphasis) | <em>Emphasized Text</em> |
<u> | Underlined text | <u>Underlined Text</u> |
<mark> | Highlighted text | <mark>Highlighted Text</mark> |
<small> | Smaller text | <small>Smaller Text</small> |
<del> | Strikethrough (deleted) text | <del>Deleted Text</del> |
<ins> | Inserted (underlined) text | <ins>Inserted Text</ins> |
<sub> | Subscript (low text) | H<sub>2</sub>O |
<sup> | Superscript (high text) | x<sup>2</sup> |