Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Web Design & Development > HTML/XHTML

  • Print
  • + Share This
  • 💬 Discuss

Marking Important and Emphasized Text

The strong element denotes important text, while em conveys emphasis. You can use them individually or together as your content requires (red_circle-a.jpg and red_circle-b.jpg).

red_circle-a.jpg The first sentence has both strong and em, while the second has em only. If <em>under any circumstances</em> were marked up instead as <strong>under any circumstances</strong>, it would have greater importance than the text contained in the surrounding strong.

...

<body>



<p><strong>Warning: Do not approach the 
   zombies <em>under any circumstances</em>.
  </strong> They may <em>look</em> 
  friendly, but that's just because they want 
  to eat your arm.</p>



</body>
</html>
04_06.jpg

red_circle-b.jpg Browsers typically display strong text in boldface and em text in italics. If em is a child of a strong element (see the first sentence in gray_circle-a.jpg), its text will be both italicized and bold.

To mark important text

  1. Type <strong>.
  2. Type the text that you want to mark as important.
  3. Type </strong>.

To emphasize text

  1. Type <em>.
  2. Type the text that you want to emphasize.
  3. Type </em>.
  • + Share This
  • 🔖 Save To Your Account

Discussions

comments powered by Disqus