<b>: the "Bring attention to" element

The HTML <b> element is used to draw the reader's attention to the content of the element, which is otherwise not given particular importance. This was previously known as the Boldface element, and most browsers still draw text bold. However, you shouldn't use it for text styling; instead, you should use the CSS font-weight property to make text bold or the <strong> element to indicate that the text is of particular importance.

Notes on usage

  • Use <b> for cases such as keywords in a summary, product names in a review, or other ranges of text whose typical presentation would be bold (but without including special prominence).
  • Do not confuse the <b> element with the <strong>, <em> or <mark> elements. The <strong> element represents text of some importance , <em> places some emphasis on the text, and the <mark> element represents text of some importance . The <b> element does not convey such special semantic information; only use it when no one else will do.
  • Likewise, do not mark titles and headings using the <b> element. To do this, use the <h1> - <h6> tags. Additionally, style sheets can change the default style of these elements, resulting in them not necessarily appearing bold.
  • It is good practice to use the class attribute of the <b> element to convey additional semantic information as needed (for example, <b class="lead"> for the first sentence of a paragraph). This makes it easier to manage multiple use cases of <b> if your stylistic needs change, without needing to change all of its uses in HTML.
  • Historically, the <b> element was supposed to make text bold. Style information has been deprecated from HTML4, so the meaning of the <b> element has changed.
  • If there is no semantic purpose in using the <b> element, you should instead use the CSS font-weight property with the value "bold" to make the text bold.


     Questo articolo spiega l'uso di alcuni elementi in un documento <b class="keywords">HTML</b>