The <em> Element in HTML

The <em> element is used to emphasize text on a webpage. When you wrap text in <em>, it tells the browser — and screen readers — that this text should have special emphasis. By default, <em> text is shown in italics, but it also adds meaning for accessibility and SEO.

em element - Educodes

Use <em> when you want to:

  • Add slight emphasis
  • Highlight a word in a sentence
  • Show tone or importance in a softer way than <strong>

The <em> tag is often used for emotional or important wording in sentences.

Understaning the layout of the <em> Element

Start tagElement contentEnd tag
<em>Traveling is exciting</em>

📘 Example Code

Below is an HTML example showing regular text and emphasized text:

💡 This is what the code looks like inside an editor

<!DOCTYPE html> <html> <head> <title>Emphasis Example</title> </head> <body> <h1>My Travel Blog</h1> <p>Traveling is exciting, but it can also be <em>unpredictable</em> and full of surprises.</p> </body> </html>

🖥️ What This Will Look Like in a Browser

✅ Example output you would see on a webpage:

Traveling is exciting, but it can also be unpredictable and full of surprises.

🧪 Time to Practise!

Now it’s your turn to use the <em> tag.

Try this example first:

<p>I am learning HTML and it is <em>very interesting</em>!</p>

What To Do

✅ Type the code above in the editor below
✅ Click Test Code to see the result
✅ Try changing the sentence and emphasising different words
✅ Experiment by using <strong> and <em> together in one sentence

Tip 💡

Use <em> for gentle emphasis.
It’s great for tone, emotion, and highlighting a word in a sentence without making it too bold.

Remember — <strong> = strong importance, <em> = soft emphasis.
Mastering both makes your writing clear and expressive online! 🚀

HTML Editor

Live Preview

Ready to make your webpage interactive?
Discover how the <a> tag connects your content with links that users can click and explore.

Educodes Logo

© Copyright 2024. | Educodes