HTML Text Formatting

HTML Text Formatting
HTML text formatting tags are used to change the appearance and emphasis of text on a web page.
1. Bold Text
<b> – Bold (visual only)
<strong> – Important text (semantic)
2. Italic Text
<i> – Italic (visual)
<em> – Emphasized text (semantic)
3. Underlined Text
4. Marked / Highlighted Text
5. Small Text
6. Deleted and Inserted Text
Deleted text
Inserted text
7. Subscript and Superscript
Subscript
Superscript
8. Monospace / Code Text
<code>
<pre> (preformatted text)
9. Quotation Tags
Short Quote <q>
Block Quote <blockquote>
10. Abbreviation
Comparison Table (Quick View)
| Tag | Purpose |
|---|---|
<b> | Bold (visual) |
<strong> | Important text |
<i> | Italic |
<em> | Emphasized |
<u> | Underline |
<mark> | Highlight |
<small> | Smaller text |
<del> | Deleted text |
<ins> | Inserted text |
<sub> | Subscript |
<sup> | Superscript |
Best Practice Tip
- Prefer semantic tags like
<strong>and<em> - Avoid using formatting tags for design → use CSS instead
