: The Bring Attention To element - HTML: HyperText Markup Language | MDN (original) (raw)

Baseline

Widely available

The <b> HTML element is used to draw the reader's attention to the element's contents, which are not otherwise granted special importance. This was formerly known as the Boldface element, and most browsers still draw the text in boldface. However, you should not use <b> for styling text or granting importance. If you wish to create boldface text, you should use the CSS font-weight property. If you wish to indicate an element is of special importance, you should use the element.

Try it

<p>
  The two most popular science courses offered by the school are
  <b class="term">chemistry</b> (the study of chemicals and the composition of
  substances) and <b class="term">physics</b> (the study of the nature and
  properties of matter and energy).
</p>
b {
  /* Add your styles here */
}

Attributes

This element only includes the global attributes.

Usage notes

Examples

<p>
  This article describes several <b class="keywords">text-level</b> elements. It
  explains their usage in an <b class="keywords">HTML</b> document.
</p>
Keywords are displayed with the default style of the
<b>element, likely in bold.</b>

Result

Technical summary

Content categories Flow content,phrasing content, palpable content.
Permitted content Phrasing content.
Tag omission None, both the starting and ending tag are mandatory.
Permitted parents Any element that acceptsphrasing content.
Implicit ARIA role generic
Permitted ARIA roles Any
DOM interface HTMLElement

Specifications

Specification
HTML # the-b-element

Browser compatibility

See also