Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

1. Fundamental Syntax and Semantics > 1.10. Adding Importance to Text

1.10. Adding Importance to Text

Problem

You want to indicate a span of text that is important.

Solution

Contain the important text with the strong element:

<p><strong>Registration is required</strong> for this event.</p>

Discussion

In previous versions of HTML, strong was used to indicate strong emphasis. In HTML5, strong indicates importance and is typically used for alerts and warnings.

Redefining <b>

Like its shunned sibling i, the b element makes a comeback in HTML5. No longer considered a presentational element, b is used to stylistically offset text from the normal prose without conveying any extra importance.

For example, b could be used for keywords, product names, or other content whose text would typically be unique compared to surrounding text, such as a paragraph lead:


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial