Live Preview
Stress emphasis in a sentence (browser default italic):
In this example, we need to highlight the importance of proper documentation.

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.
Wrap stressed words in valid <em> opening and closing tags.
Understand stress emphasis vs purely visual italics.
Choose the right inline element for emphasis, mood, or urgency.
Apply stronger stress to a phrase inside already emphasized text.
Customize italic appearance with classes and stylesheets.
Help screen readers convey the right level of emphasis.
<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.
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.
Wrap the text you want to emphasize between opening and closing <em> tags:
<em>Your Emphasized Text Here</em><em> is an inline element—it nests inside paragraphs and other phrasing content.<em />) is not valid in HTML.em increases emphasis on an inner portion of text.class and style for custom styling.| Use Case | Code Snippet | Result |
|---|---|---|
| Basic emphasis | <em>highlight</em> | highlight |
| In a sentence | We must <em>always</em> test | We 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 attrs | None | Global attributes only |
<em> vs <i>Both may appear italic, but they communicate different meaning:
| Element | Meaning | Best for |
|---|---|---|
<em> | Stress emphasis | Words that change sentence meaning when stressed |
<i> | Alternate voice or mood | Technical terms, foreign phrases, thoughts (stylistic italics) |
| Appearance | Both often italic | Default browser styles can look similar |
| Accessibility | Different roles | em adds stress; i does not imply urgency |
<em> vs <strong>Choose emphasis for stress and strong for importance:
| Element | Meaning | Best for |
|---|---|---|
<em> | Stress emphasis | Highlighting a word that shifts meaning in context |
<strong> | Strong importance | Warnings, critical instructions, urgent content |
| Default style | em = italic | strong = bold (browser defaults) |
| Together | Both semantic | <strong><em>Act now</em></strong> for urgent stressed text |
<p>I <em>did</em> tell you yesterday.</p>
<p><strong>Warning:</strong> Do not share your password.</p>The <em> tag has no tag-specific attributes. Combine it with global attributes for styling:
class GlobalCSS hook for custom emphasis styling beyond default italics.
class="highlight"style GlobalInline CSS for one-off font weight, color, or style changes.
style="font-weight: bold;"id GlobalUnique identifier for linking or scripting the emphasized span.
id="key-term"lang GlobalLanguage of emphasized text when it differs from the document.
lang="fr"<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.
Basic emphasis, nested stress, and styled em patterns with copy-ready code and live previews.
Stress emphasis in a sentence (browser default italic):
In this example, we need to highlight the importance of proper documentation.
The primary use of <em> is to emphasize text within a sentence or paragraph.
<p>In this example, we need to <em>highlight</em> the importance of proper documentation.</p>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.
Nest <em> tags to apply stronger stress to a portion of already emphasized text.
<p>This is an <em>important <em>note</em></em> for all users.</p>Combine class and style with <em> for custom visual emphasis while keeping semantic meaning.
<em class="highlight" style="font-weight: bold;">Your Styled Emphasized Text Here</em>Browsers italicize em by default. Customize appearance with CSS while preserving semantic emphasis:
font-style Default italiccolor Brand accent on stressfont-weight Bold + italic combofont-style: normal Emphasis without italics/* 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
Please read the release notes before deploying.
Semantic emphasis helps assistive technologies convey meaning:
em content.i when appropriate.strong, not just em.Wrap the word or phrase that shifts meaning when spoken with emphasis in em.
User-agent styles visually distinguish emphasized text from surrounding prose.
Screen readers can change pronunciation or stress for em content.
Readers and assistive tech understand which words carry stress in your content.
The <em> element is fully supported in all browsers, including legacy Internet Explorer.
From legacy Internet Explorer to the latest mobile browsers — the em element is fully supported for inline stress emphasis.
Bottom line: Ship semantic emphasis with confidence. The <em> element is safe to use in every production environment today.
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.
em for semantic stress emphasisstrong for urgent or important contentem only for visual italicsem with strong or iem blindly<em>Bookmark these before you ship — they’ll keep your emphasis semantic and accessible.
<em> marks words that shift meaning when stressed.
Browsers render em in italics by default.
Renderingi is stylistic; em is semantic stress.
strong = importance; em = stress.
Nested em increases emphasis on inner text.
PatternWorks in every browser, including legacy IE.
Compatibilityem 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.em elements increase emphasis on the inner portion. Use nesting sparingly for clarity.Highlight stressed words and try nested emphasis in the interactive HTML editor.
6 people found this page helpful