Back to HTML Notes
Topic #99

Emphasis (em)

Learn how to use the <em> element to indicate stress emphasis that changes the meaning of a sentence, and understand why it is semantically different from <i>.

What it is

The <em> element represents stress emphasis. This means the content inside the tags should be read with vocal stress, which alters the semantic meaning of the sentence. It is not just about visual styling (like italics); it is about conveying intent to assistive technologies like screen readers.

Related terms include <strong> (for strong importance or urgency) and <i> (for alternate voice or mood without changing meaning).

Why it matters

  • Semantic Clarity: It tells browsers and search engines that specific words carry extra weight in the context of the sentence.
  • Accessibility: Screen readers often change their tone or speed when encountering <em>, helping users with visual impairments understand the nuance.
  • Separation of Concerns: It allows you to define meaning in HTML while handling appearance (italics) in CSS, keeping your code cleaner.
  • Correct Usage: Prevents the misuse of <i> for emphasis, which can confuse automated translation tools and accessibility software.

Syntax or steps

Wrap the word or phrase that requires vocal stress in opening and closing <em> tags. The browser will typically render this as italic text by default, but you should rely on the semantic tag, not the style.

<p>I <em>really</em> want to go.</p>

Example

Consider how moving the <em> tag changes the meaning of the same sentence structure.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Emphasis Example</title>
</head>
<body>
    <h1>Stress Emphasis</h1>
    
    <p>Original: I didn't say he stole the money.</p>
    
    <p>Meaning 1: <em>I</em> didn't say he stole the money. 
       (Someone else said it.)</p>
       
    <p>Meaning 2: I didn't <em>say</em> he stole the money. 
       (I implied it, or thought it.)</p>
       
    <p>Meaning 3: I didn't say <em>he</em> stole the money. 
       (Someone else stole it.)</p>
</body>
</html>

In this example, the text remains identical, but the placement of <em> shifts the focus. A screen reader would emphasize "I", "say", or "he" respectively, clarifying who did what.

Common mistakes

  • Using <i> for emphasis: Developers often use <i> because it looks like italics. However, <i> is for technical terms, foreign phrases, or thoughts, not for stressing a point.
  • Relying on CSS for meaning: If you remove the <em> tag and just apply font-style: italic; via CSS, you lose the semantic information for accessibility tools.
  • Nesting unnecessarily: Avoid nesting <em> inside <strong> unless there is a distinct need for both levels of intensity. Usually, one is sufficient.
  • Overusing emphasis: If every other word is emphasized, nothing is emphasized. Use <em> sparingly for maximum impact.

When to use it

Use <em> when you need to indicate stress that changes the meaning of the sentence. Use <i> when you need to set off text for stylistic reasons or to denote a different voice (like a book title or scientific name) where the meaning does not change based on stress.

Element Purpose Screen Reader Behavior
<em> Stress emphasis (changes meaning) Changes tone/pitch to indicate stress
<i> Alternate voice/mood (no meaning change) May change voice type (e.g., whisper) or remain neutral

Practice

Guided Exercise: Write a sentence where emphasizing the verb changes the implication from an action to a promise. For example: "I will help you."

Challenge: Rewrite the following using <em> correctly instead of <i>: "The term quantum entanglement is complex." Hint: Is this stress emphasis? No. Keep it as <i> or consider if <code> is better for technical terms.

Quick check

Question: Why is <em> preferred over <i> for highlighting a key word in a warning message?

Answer: Because <em> conveys semantic stress and importance to assistive technologies, whereas <i> only indicates a stylistic shift in voice or mood without implying urgency or emphasis.

Summary

The <em> element is a semantic tool for indicating stress emphasis that alters the meaning of a sentence. Unlike <i>, which is purely stylistic or contextual, <em> ensures that both humans and machines understand the intended focus of your text.

Want to go beyond the notes?

Join Coding Now Tech Institute's HTML course — live mentorship, real projects, and 100% placement support.

Enroll Now — Free Demo Available

Emphasis (em) – FAQs

Quick answers about learning Emphasis (em) in HTML.

This free note from Coding Now Tech Institute explains Emphasis (em) in HTML — concept, syntax and worked code examples you can copy, run and revise before interviews.
Yes. Every HTML topic on Coding Now Tech Institute, including Emphasis (em), is 100% free with no signup required.
With focused practice, most students grasp Emphasis (em) in 1–3 days from these notes; pairing it with Coding Now Tech Institute's mentor-led course takes you to job-ready depth faster.
Use the code examples in this note, then ask doubts for free on the Coding Now Tech Institute Community (/community) — expert instructors answer within 24 hours.
Call NowEnroll Now