The <em>
tag is used to emphasize text. By default, it renders the enclosed text in italic style in most browsers.
But it’s not just about style — the <em>
tag also adds semantic meaning for screen readers and search engines, signaling that the content is important or should be stressed.
✅ Syntax
<p>This is <em>very</em> important information.</p>
📍 Result:
This is very important information.
🎯 When to Use
Use <em>
when you want to indicate that a word or phrase should be emphasized when read aloud or interpreted.
✅ Examples:
<p>I said <em>now</em>, not later.</p>
<p>Please <em>do not forget</em> your passport.</p>
🎨 Styling with CSS (Optional)
You can style emphasized text beyond the default italics:
<style>
em {
color: red;
font-style: normal;
font-weight: bold;
}
</style>
Result: You can make the emphasized text bold, colored, or styled however you’d like.
⚠️ <em>
vs <i>
Tag | Purpose | Meaningful? (Semantic) |
---|---|---|
<em> | Emphasizes meaning (stress) | ✅ Yes |
<i> | Italic styling only (e.g. for foreign words or icons) | ❌ No (visual only) |
Use <em>
when you want to communicate meaning or importance.
✅ Summary
Feature | <em> Tag |
---|---|
Purpose | Emphasize important words or phrases |
Default Style | Italic |
Semantic | ✅ Yes |
Accessibility | Recognized by screen readers |
Best Use | Indicating stressed or important text in context |