Em marks stress that changes how a sentence is understood. i can mark an alternate voice, such as a foreign word, without expressing extra emphasis.
What You Need to Know
The browser often displays both in italics. Appearance alone is not enough to decide which one you need.
The goal is not to collect as many tags as possible. Pick the element that best describes what the content really is.
Example: See It in Action
Add this example to the appropriate part of a practice HTML page. Read each line before you open the page in your browser.
This is a short HTML fragment. To try it as a webpage, put it inside the body element of a complete HTML document.
<p>You <em>really</em> need to save your changes.</p>
<p>The word <i>bonjour</i> comes from French.</p>
<p>Emphasis is not the same as another voice.</p>
Let’s Understand the Example
- Em marks words that are stressed in the sentence, which can change the meaning when read aloud.
- I marks text in an alternate voice, such as a term, title treatment or foreign phrase.
- A p groups a paragraph of related text. Start another paragraph for a new thought.
Look for the text “You” in the page. If the visible result surprises you, inspect the rendered elements to see what the browser actually built.
What Should You See?
The page should include “really”. If it looks different from what you expected, open developer tools and compare the source with the elements the browser created.
Try removing one piece of markup in a scratch copy, refresh the page, and compare the behavior. This is often the fastest way to understand what that piece contributes.
Try It Yourself
- Write a sentence where emphasizing a different word changes its meaning.
- Save your changes, open or refresh the page, and compare the result with the original example.
- Tell a friend what your change did. If you are not sure, undo it, refresh the page, and compare.
Common Beginner Mistakes
- Using em whenever you want decoration even if no emphasis is intended.
- Avoid picking tags just for their default bold, italic or spaced appearance. Use CSS for presentation.
Key Takeaways
- Em marks stress that changes how a sentence is understood. i can mark an alternate voice, such as a foreign word, without expressing extra emphasis.
- Em marks words that are stressed in the sentence, which can change the meaning when read aloud.
- The browser often displays both in italics. Appearance alone is not enough to decide which one you need.