HTML <em> Tag

Beginner
⏱️ 5 min read
📚 Updated: Jun 2026
🎯 3 Examples
Text & Semantics

What You’ll Learn

By the end of this tutorial, you’ll use the <em> element to add meaningful stress emphasis to your HTML content.

In HTML, the <em> tag plays a vital role in emphasizing text with semantic meaning. This guide covers syntax, common patterns, accessibility, and best practices for beginners and web developers alike.

01

Core Syntax

Wrap stressed words in valid <em> opening and closing tags.

02

Semantic Emphasis

Understand stress emphasis vs purely visual italics.

03

em vs i & strong

Choose the right inline element for emphasis, mood, or urgency.

04

Nested Emphasis

Apply stronger stress to a phrase inside already emphasized text.

05

CSS Styling

Customize italic appearance with classes and stylesheets.

06

Accessibility

Help screen readers convey the right level of emphasis.

What Is the <em> Tag?

The emphasis element (<em>) represents text with stress emphasis. Browsers typically render emphasized text in italics, although the exact appearance may vary based on browser styles and your CSS.

💡
Semantic, not decorative

Use <em> when changing the emphasis of a word changes the meaning of the sentence. Reach for <i> only when you need alternate voice or mood without semantic stress.

The element is inline, so it flows naturally inside paragraphs, list items, and headings. Assistive technologies may read em content with added vocal stress.

📝 Syntax

Wrap the text you want to emphasize between opening and closing <em> tags:

syntax.html
<em>Your Emphasized Text Here</em>

Syntax Rules

  • <em> is an inline element—it nests inside paragraphs and other phrasing content.
  • Self-closing syntax (<em />) is not valid in HTML.
  • Nesting em increases emphasis on an inner portion of text.
  • Use global attributes like class and style for custom styling.

⚡ Quick Reference

Use CaseCode SnippetResult
Basic emphasis<em>highlight</em>highlight
In a sentenceWe must <em>always</em> testWe must always test
Nested emphasis<em>very <em>important</em></em>very important
Strong importance<strong>Warning</strong>Warning
Stylistic italic<i>Latin phrase</i>Alternate voice, not stress
Tag-specific attrsNoneGlobal attributes only

⚖️ <em> vs <i>

Both may appear italic, but they communicate different meaning:

ElementMeaningBest for
<em>Stress emphasisWords that change sentence meaning when stressed
<i>Alternate voice or moodTechnical terms, foreign phrases, thoughts (stylistic italics)
AppearanceBoth often italicDefault browser styles can look similar
AccessibilityDifferent rolesem adds stress; i does not imply urgency

⚖️ <em> vs <strong>

Choose emphasis for stress and strong for importance:

ElementMeaningBest for
<em>Stress emphasisHighlighting a word that shifts meaning in context
<strong>Strong importanceWarnings, critical instructions, urgent content
Default styleem = italicstrong = bold (browser defaults)
TogetherBoth semantic<strong><em>Act now</em></strong> for urgent stressed text
em-vs-strong.html
<p>I <em>did</em> tell you yesterday.</p>
<p><strong>Warning:</strong> Do not share your password.</p>

🧰 Attributes

The <em> tag has no tag-specific attributes. Combine it with global attributes for styling:

class Global

CSS hook for custom emphasis styling beyond default italics.

class="highlight"
style Global

Inline CSS for one-off font weight, color, or style changes.

style="font-weight: bold;"
id Global

Unique identifier for linking or scripting the emphasized span.

id="key-term"
lang Global

Language of emphasized text when it differs from the document.

lang="fr"
attributes.html
<em class="highlight" style="font-weight: bold;">Your Styled Emphasized Text Here</em>

Prefer CSS classes over inline styles for reusable design systems—but keep em for semantic emphasis, not just visual italics.

Examples Gallery

Basic emphasis, nested stress, and styled em patterns with copy-ready code and live previews.

Live Preview

Stress emphasis in a sentence (browser default italic):

In this example, we need to highlight the importance of proper documentation.

Basic Emphasis

The primary use of <em> is to emphasize text within a sentence or paragraph.

basic-emphasis.html
<p>In this example, we need to <em>highlight</em> the importance of proper documentation.</p>
Try It Yourself

📚 Common Use Cases

Use <em> to stress words in prose, draw attention to a contrasting idea, emphasize a correction (“I did tell you”), or increase emphasis with nested em tags when one phrase needs stronger stress.

Nested Emphasis

Nest <em> tags to apply stronger stress to a portion of already emphasized text.

nested-emphasis.html
<p>This is an <em>important <em>note</em></em> for all users.</p>
Try It Yourself

Styled Emphasis with CSS

Combine class and style with <em> for custom visual emphasis while keeping semantic meaning.

styled-em.html
<em class="highlight" style="font-weight: bold;">Your Styled Emphasized Text Here</em>
Try It Yourself

Styling <em> with CSS

Browsers italicize em by default. Customize appearance with CSS while preserving semantic emphasis:

font-style Default italic
color Brand accent on stress
font-weight Bold + italic combo
font-style: normal Emphasis without italics
em-styles.css
/* Default emphasis styling */
em {
  font-style: italic;
}

em.highlight {
  font-style: italic;
  font-weight: 600;
  color: #1e40af;
}

em.subtle {
  font-style: normal;
  font-weight: 600;
}

Live styled emphasis

♿ Accessibility

Semantic emphasis helps assistive technologies convey meaning:

  • Use em for stress — screen readers may apply vocal emphasis to em content.
  • Don’t use em for decoration — purely visual italics belong in CSS or i when appropriate.
  • Choose strong for urgency — warnings and critical content deserve strong, not just em.
  • Avoid overusing emphasis — too much stressed text dilutes its impact and hurts readability.

🧠 How <em> Works

1

Author marks stressed words

Wrap the word or phrase that shifts meaning when spoken with emphasis in em.

Markup
2

Browser applies default italic

User-agent styles visually distinguish emphasized text from surrounding prose.

Rendering
3

Assistive tech adds stress

Screen readers can change pronunciation or stress for em content.

Accessibility
=

Meaningful emphasis

Readers and assistive tech understand which words carry stress in your content.

Universal Browser Support

The <em> element is fully supported in all browsers, including legacy Internet Explorer.

Baseline · Since HTML 4

Semantic emphasis that works everywhere

From legacy Internet Explorer to the latest mobile browsers — the em element is fully supported for inline stress emphasis.

100% Core tag support
Google Chrome All versions · Desktop & Mobile
Full support
Mozilla Firefox All versions · Desktop & Mobile
Full support
Apple Safari All versions · macOS & iOS
Full support
Microsoft Edge All versions · Chromium & Legacy
Full support
Internet Explorer IE 6+ · Legacy environments
Full support
Opera All modern versions
Full support
<em> tag 100% supported

Bottom line: Ship semantic emphasis with confidence. The <em> element is safe to use in every production environment today.

Conclusion

Mastering the <em> tag helps you add meaningful stress emphasis to specific words and phrases. Proper usage contributes to accessible, well-structured content—use it for semantic emphasis, not decoration alone.

Remember the difference between em, i, and strong, test rendering across browsers, and avoid overusing emphasis so your stressed words stay impactful.

💡 Best Practices

✅ Do

  • Use em for semantic stress emphasis
  • Choose strong for urgent or important content
  • Apply consistent CSS classes for styled emphasis
  • Test rendering in different browsers

❌ Don’t

  • Use em only for visual italics
  • Overuse emphasis throughout a paragraph
  • Confuse em with strong or i
  • Replace all CSS italics with em blindly

Key Takeaways

Knowledge Unlocked

Six truths every developer should know about <em>

Bookmark these before you ship — they’ll keep your emphasis semantic and accessible.

6
Core concepts
📝 02

Default Italic

Browsers render em in italics by default.

Rendering
⚖️ 03

Not the Same as i

i is stylistic; em is semantic stress.

Comparison
04

Not the Same as strong

strong = importance; em = stress.

Distinction
🔗 05

Nesting Allowed

Nested em increases emphasis on inner text.

Pattern
🌐 06

Universal Support

Works in every browser, including legacy IE.

Compatibility

❓ Frequently Asked Questions

It marks stress emphasis — text that should be emphasized in context. Screen readers may change tone when reading em content.
em carries semantic stress emphasis. i represents alternate voice or mood, often for stylistic italics without semantic stress.
em marks stress within a sentence. strong marks strong importance or urgency.
Yes. Browsers apply italic styling by default. You can override appearance with CSS while keeping the semantic role.
Yes. Nested em elements increase emphasis on the inner portion. Use nesting sparingly for clarity.

Practice Semantic Emphasis

Highlight stressed words and try nested emphasis in the interactive HTML editor.

Try basic emphasis →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

6 people found this page helpful