The HTML <b>
element represents a span of text stylistically different from normal text, without conveying any special importance or relevance, and that is typically rendered in boldface.
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 accepts phrasing content. |
Permitted ARIA roles | Any |
DOM interface |
HTMLElement Up to Gecko 1.9.2 (Firefox 4) inclusive, Firefox implements the HTMLSpanElement interface for this element. |
This element only includes the global attributes.
<b>
for cases like keywords in a summary, product names in a review, or other spans of text whose typical presentation would be boldfaced.<b>
element with the <strong>
, <em>
, or <mark>
elements. The <strong>
element represents text of certain importance, <em>
puts some emphasis on the text and the <mark>
element represents text of certain relevance. The <b>
element doesn't convey such special semantic information; use it only when no others fit.<b>
element. For this purpose, use the <h1>
to <h6>
tags. Further, stylesheets can change the default style of these elements, with the result that they are not necessarily displayed in bold.<b>
in order to convey additional semantic information (for example <b class="lead">
for the first sentence in a paragraph). This eases the development of several stylings of a web document, without the need to change its HTML code.<b>
element was meant to make text boldface. Styling information has been deprecated since HTML4, so the meaning of the <b>
element has been changed.<p> This article describes several <b>text-level</b> elements. It explains their usage in an <b>HTML</b> document. </p> Keywords are displayed with the default style of the <b> element, likely in bold.
This article describes several text-level elements. It explains their usage in an HTML document.
Keywords are displayed with the default style of the <b> element, likely in bold.
Specification | Status | Comment |
---|---|---|
WHATWG HTML Living Standard The definition of '<b>' in that specification. | Living Standard | |
HTML5 The definition of '<b>' in that specification. | Recommendation | |
HTML 4.01 Specification The definition of '<b>' in that specification. | Recommendation |
Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic support | (Yes) | (Yes) | 1.0 (1.7 or earlier) | (Yes) | (Yes) | (Yes) |
Feature | Android | Edge | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | (Yes) | (Yes) | 1.0 (1.0) | (Yes) | (Yes) | (Yes) |
<a>
, <em>
, <strong>
, <small>
, <cite>
, <q>
, <dfn>
, <abbr>
, <time>
, <code>
, <var>
, <samp>
, <kbd>
, <sub>
, <sup>
, <i>
, <mark>
, <ruby>
, <rp>
, <rt>
, <bdo>
, <span>
, <br>
, <wbr>
.
© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/b