The <b> element brings attention to its contents without giving them special importance. Most browsers still render it in boldface, but that look is not its purpose.
Use it for keywords in a summary, product names in a review, or similar conventionally bold spans. For real importance use <strong>; for pure styling use CSS font-weight.
Baseline · Widely available.
Not deprecated. Stable across browsers since about July 2015 (and long before as HTML bold markup).
Historical note.
Formerly called the Boldface element. Presentational “make it bold” meaning is outdated — today <b> means bring attention, not importance.
Do not use for importance or headings.
Choose <strong> for urgency/importance and <h1>–<h6> for titles. Do not confuse <b> with <em> (stress emphasis) or <mark> (relevance/highlight).
Syntax
HTML Syntax
syntax.html
<b>text</b>
Both start and end tags are required. Content is phrasing content (inline text and similar).
Reference
Attributes
<b> has no element-specific attributes. It uses global attributes; these are the ones you will reach for most often:
Attribute
Description
Try it
(none specific)
No tag-only attributes — meaning comes from the element itself
Use <b> when the word is a conventional bold span (keyword, label) without urgency.
Use <strong> when the text is important or urgent.
Do not choose by looks alone — both may appear bold.
Screen readers treat importance from <strong> differently from a generic <b> span.
Edge Cases & Pitfalls
Most <b> mistakes come from treating it as a bold style switch.
semantics
Not a substitute for <strong>
Importance and urgency belong on <strong>, not <b>.
style
Pure decoration → CSS
If bold is only a design choice, use font-weight instead of wrapping everything in <b>.
structure
Do not fake headings with <b>
Headings need <h1>–<h6>. Bold text alone is not a heading in the outline.
compare
Also not <em> or <mark>
<em> is stress emphasis; <mark> is relevance/highlight. Use <b> only when those do not fit.
maintain
Prefer a class on repeated uses
Keywords vs product names can share <b> but different classes keep CSS and scripts flexible.
Compatibility
Browser Support
The <b> element is core HTML phrasing content in every browser. It is not a Node.js, Deno, or Bun API.
✓ Baseline · Widely available
<b>
Widely available since about July 2015 (and earlier as HTML bold). Chrome, Firefox, Safari, Edge, and Opera all support it. Default bold styling can still be overridden by CSS.
98%Global support (approx.)
Google ChromeAll
Full support
Mozilla FirefoxAll
Full support
Apple SafariAll
Full support
Microsoft EdgeAll
Full support
OperaAll
Full support
Samsung InternetAll
Full support
Internet ExplorerAll
Supported
<b>Widely supported
Bottom line: Safe to use everywhere. Choose strong, em, mark, or CSS when the meaning is importance, stress, relevance, or pure style.
Remember
Key Takeaways
Role:<b> brings attention — it does not mark importance.
Use cases: keywords, product names, and similar conventionally bold spans.
Alternatives:<strong> for importance, CSS for decoration, headings for titles.
Practice: add a class when you reuse <b> for different roles.
One line: use <b> to draw eyes to text that is not specially important.
UA style
Default CSS Settings
User-agent stylesheets typically bold the element. Exact rules can vary slightly by browser:
default.css
b {
font-weight: bold;
}
You may override this with CSS. Remember that changing the look does not change the element’s meaning.
Frequently Asked Questions
The b element draws the reader's attention to text that is not otherwise given special importance — for example keywords in a summary or product names in a review. Browsers usually render it bold.
Both often look bold. strong marks text as important or urgent for meaning and assistive tech. b only brings visual attention without that extra importance.
Use CSS font-weight when bold is only a design choice. Use b when you need a text-level hook for conventionally bold spans (keywords, product names) that are not semantically strong.
No. b supports only the global HTML attributes. Adding a class (for example class="keyword") is recommended so you can style or script use cases cleanly.
No. Use h1–h6 for headings. Styling alone can change how headings look; wrapping a heading in b does not make it a heading.
No. It is still valid HTML. Its meaning changed from a pure presentational bold tag to "bring attention to" text without implying importance.