The <b> tag makes text visually bold with no extra importance attached — a purely stylistic choice, used when bold is the conventional way to present something, not because the content is urgent or important.
Syntax
<b>text to bold</b>
Basic Example
<p>The <b>CodingNow</b> team hosts a free webinar every Friday.</p>
Browser output: "CodingNow" appears in bold within the sentence — visually identical to what <strong> would produce, but carrying no "this is important" meaning underneath.
How It Works
The browser applies font-weight: bold by default. That's the entire behavior — <b> is a purely visual instruction with a narrow, defined use case: text that's conventionally bolded (like product names or keywords in a summary) without implying urgency.
Important Attributes
| Attribute | Purpose |
|---|---|
| — none — | Only the universal global attributes apply; <b> has no element-specific attributes |
Real-World Example
<p>Ingredients: <b>flour</b>, <b>sugar</b>, <b>eggs</b>, and <b>butter</b>.</p>
Bolding the keywords in a recipe's ingredient list is a genuine, correct use of <b> — it makes each ingredient easy to scan, without claiming any one of them is more "important" than the others.
Comparison: b vs strong
<b> | <strong> | |
|---|---|---|
| Meaning | Stylistic bold, no importance implied | Genuine importance, seriousness, or urgency |
| Default look | Bold | Bold (visually identical) |
| Screen reader behavior | Read as plain text | May be read with added vocal emphasis |
| Example use | Bolding a product name in a list | "Warning: this cannot be undone." |
See strong for the full breakdown.
Common Mistakes
- Using
<b>for warnings, alerts, or genuinely critical text — that content needs<strong> - Using
<b>as a substitute for a real heading tag when text just needs to stand out
Best Practices
- Reach for
<b>only for conventional stylistic bold with genuinely no importance implied - When in doubt about whether content is "important," it usually belongs in
<strong>, not<b>
Accessibility Considerations
<b> carries no semantic weight to assistive technology — it's announced (or not announced) the same as plain surrounding text, just visually bold.
SEO Considerations
No meaningful ranking effect either way — bolding a word with <b> is not a keyword-stuffing shortcut and doesn't move rankings.
Browser & Modern HTML Notes
<b> is valid in HTML5, but with redefined semantics — it used to be a purely presentational relic; HTML5 gave it this narrow "stylistically offset, no extra importance" meaning instead of deprecating it outright.
Mini Practice
- Bold the key ingredient names in a short recipe using
<b>. - Find a sentence online using
<b>for a warning message, and identify why it should really be<strong>.