Publish in HTML Tutorial el 23/05/2025 22:58
The <em>
element is used to define emphasized text in HTML. By default, browsers typically render this as italic text, but it's important to understand that emphasis is semantic, while italics are purely presentational.
When you use <em>
, you're telling browsers and assistive technologies that this text should be stressed or emphasized when read aloud. Screen readers will often change their tone or inflection for content wrapped in <em>
tags.
Rendered result: This text will be emphasized
This example shows simple text emphasis in a sentence.
Showing how to emphasize multiple parts of a sentence.
Demonstrating how <em>
can be nested within other elements.
Using JavaScript to toggle emphasis on user interaction.
Automatically emphasizing text based on the time of day.
em { font-style: italic; color: #d32f2f; }
<em>
differently from <i>
, so choose the right one for your needs.<em>
elements for stronger emphasis, though this is rarely needed.<em>
to significantly impact rankings.While both elements typically render as italic text, they serve different purposes:
Element | Purpose | Semantic Meaning |
---|---|---|
<em> |
Textual emphasis | Changes the meaning of the sentence |
<i> |
Alternative voice or mood | No semantic emphasis (e.g., technical terms, thoughts) |
Remember: <em>
is for content that needs emphasis, while <i>
is for content that should be set apart stylistically without semantic importance.
The <style> HTML element contains style information for a document, or part of a document. ...
The <strong> element is used to indicate that its content has strong importance, seriousnes...
The <span> element is an inline container used to mark up a part of a text or document. Unl...
The <source> element is used to specify multiple media resources for media elements like &l...
The <small> element is used to represent side-comments and small print, typically for discl...
HTML <section> Element: The Complete Guide The <section> element is a semantic HTML ...