LESSON 7

Text Formatting

Learning objective: Emphasize words using semantic formatting elements.

Understand

HTML can highlight words to add meaning, not just style.

Use <strong> for important text and <em> for emphasis — these carry meaning that screen readers announce. <b> and <i> only change appearance. Prefer the semantic tags when the meaning matters.

Analogy: <strong> is like raising your voice for a key point; <em> is like stressing a word in a sentence.

See It in Action

Mix normal and emphasized text:

<p>This is <strong>very important</strong> and <em>worth noting</em>.</p>
How it works: <strong> marks the phrase as important (often bold) and <em> marks emphasis (often italic), while keeping the meaning for assistive tech.

Try It Yourself

  1. Write a sentence and wrap one phrase in <strong>.
  2. Wrap another phrase in <em>.
  3. Refresh and see the bold and italic styles.

Quick Quiz

Which tag communicates that text is important, not just bold?

Challenge

Write a safety notice that uses <strong> for the key warning.

Success condition: Your notice emphasizes the most important phrase with a semantic tag.