Coding Hubs School of AI – Best AI & Full Stack Courses in Delhi NCR | 100% Placement
Limited Offer: Get 50% OFF on AI & Full Stack Courses
📞 Call Now: +91 8448811540
Back to HTML Notes
Topic #205

Bold Text (b)

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

AttributePurpose
— 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>
MeaningStylistic bold, no importance impliedGenuine importance, seriousness, or urgency
Default lookBoldBold (visually identical)
Screen reader behaviorRead as plain textMay be read with added vocal emphasis
Example useBolding 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

  1. Bold the key ingredient names in a short recipe using <b>.
  2. Find a sentence online using <b> for a warning message, and identify why it should really be <strong>.

Related HTML Notes

Want to go beyond the notes?

Join Coding Hubs School of AI's HTML course — live mentorship, real projects, and 100% placement support.

Enroll Now — Free Demo Available
💬 Talk to Advisor
1
WhatsApp

Latest from Our Blog

Insights on AI, Data Science, Full Stack & Career

View All Articles →