b (HTML element)

Spec
Depr. Empty Version
No No HTML 2
Browser support (more…)
IE5.5+ FF1+ SA1.3+ OP9.2+ CH2+
Full Full Full Full Full

Syntax

<b>
</b>

Description

The b (short for bold) element simply styles the text it encloses in a bold typeface—assuming it’s not already presented a bold typeface—but offers no semantic meaning about the contained text.

While the b element isn’t deprecated—even in XHTML 1.1—its use is declining, as in many cases it’s more appropriate to use either an emphasis (em) or strong emphasis (strong) element instead.

The example above would appear as shown in Figure 1.

Figure 1. An example of b in action Example of b element

Example

A correct usage of the b element is shown below. Here, it’s used to show that the text is bold in appearance—it’s not signifying importance:

<p>The MrBigStuff logo was a mixture of normal and bold
    characters: "Mr <b>Big</b> Stuff"</p>

Use This For …

This element is used to mark up text which needs to be stylistically offset from the normal prose in a way that doesn’t confer any extra importance on that text. The b element should, therefore, be used only as a last resort when no other element is more appropriate. For the examples above, it’s preferable to use a b element rather than a span with a bold style applied through CSS.

Compatibility

Internet Explorer Firefox Safari Opera Chrome
5.5 6.0 7.0 8.0 1.0 1.5 2.0 3.0 3.5 1.3 2.0 3.1 4.0 9.2 9.5 10.0 2.0
Full Full Full Full Full Full Full Full Full Full Full Full Full Full Full Full Full

As one of the earliest formatting elements, b has full browser support.

User-contributed notes

Related Products