1. Technology

What is an Emphasis Tag?

By

Question: What is an Emphasis Tag?
Answer:

If you learned HTML before you learned XHTML, you probably know about the bold and italics tags. But these tags are not semantic elements because they define how the text should look rather than information about the text. That's why they have been generally replaced by strong (for bold) and emphasis (for italics).

The strong and emphasis elements add interest to your text. Unlike some other XHTML tags, they are meant to look the same on all browsers. Simply surround your text with the opening and closing tags (<em> and </em> for emphasis and <strong> and </strong> for strong emphasis).

You can nest these tags and it doesn't matter which is the external tag. Try testing this block of code in your HTML page:

<em>This text is emphasized</em> most browsers display it as italics.
<strong>This text is strongly emphasized</strong> most browsers display it as bold.
<strong><em>This text is both strong and emphasized</em></strong> usually displayed as bold and italics.

©2014 About.com. All rights reserved.