References

Beginner-friendly references for web development, with live, editable examples.

The HTML <b> tag

Element All modern browsers Updated
Quick answer

The HTML <b> element renders text bold to draw attention stylistically — keywords, product names, the lead sentence — without implying extra importance. For genuinely important content, use <strong> instead.

Overview

The <b> element draws attention to a span of text stylistically without giving it any added importance or emphasis. Think keywords in an article summary, product names in a review, or the opening words of a paragraph — text you want to stand out visually, but that carries no extra meaning.

It is the bold counterpart to <i>. The key distinction is from <strong>: when the text actually is important — a warning, a critical instruction — use <strong>, which conveys that meaning to assistive technology and search engines. <b> deliberately conveys nothing semantically.

And if you simply want bold styling with no semantic role at all, the CSS font-weight property on a <span> (or any element) is the cleaner choice. Reach for <b> specifically when you want to single out text without claiming it is important.

Syntax

<p>The <b>quick brown fox</b> jumps.</p>

Example

Live example
<p>Introducing <b>CodeShack Pro</b> — our new plan.</p>

Best practices

  • Use <b> to draw attention to text stylistically — keywords, names, lead-ins — without implying importance.
  • When the text genuinely is important, use <strong> instead.
  • For purely visual bold with no semantics, use the CSS font-weight property.
  • Do not overuse it — if everything is bold, nothing stands out.

Frequently asked questions

What is the difference between b and strong?
<b> bolds text without adding meaning; <strong> marks the text as important, which assistive technology conveys.
When should I use the b element?
When you want text to stand out visually but it carries no extra importance — product names, keywords, or the opening words of a passage.
Is the b element deprecated?
No. It was redefined in HTML5 to mean "stylistically offset text" rather than just "bold", so it remains valid for that purpose.
How do I make bold text without using b or strong?
Apply the CSS font-weight: bold to the element you want to bold.