Bold, Italic, and Underline
What you'll learn: You'll understand the difference between HTML tags that change appearance and those that convey meaning.
The Two Approaches
HTML gives you two ways to make text bold, italic, or underlined — one that's purely visual and one that's meaningful to computers and screen readers.
Presentational Tags (Old School)
<b>makes text bold (just visually)<i>makes text italic (just visually)<u>underlines text (just visually)
These tags say "make this look different" but don't explain why it should look different.
Semantic Tags (Modern Best Practice)
<strong>indicates strong importance (browsers show it bold by default)<em>indicates emphasis (browsers show it italic by default)
These tags communicate meaning. Screen readers can stress <strong> text or change tone for <em> text, helping visually impaired users.
Think of It Like Road Signs
Imagine two signs both painted red. One is red because someone liked the color (presentational). The other is red because it means "stop" — the color carries meaning (semantic). The <b> tag is like the first sign; <strong> is like the second.
When to Use Each
Use <strong> and <em> for 99% of cases where you want bold or italic text — they're accessible and meaningful.
Use <b>, <i>, <u> only when you need the visual style without adding meaning — like a product name that's italicized by convention, or a keyword in documentation.
Key Takeaway: Prefer semantic tags like <strong> and <em> over presentational tags like <b> and <i> because they communicate why text is styled, not just how it looks, making your content more accessible and meaningful.