Path // www.yourhtmlsource.comReference → <b>

<b>


The <b> element has been repurposed in HTML5. Originally used simply to render text in bold, it now represents text that is stylistically offset from normal prose without conveying extra importance or emphasis. This includes keywords in abstracts, product names in reviews, or other text conventionally styled in bold.

Clock This page was last updated on 2025-11-17



HTML5 Semantic Meaning

The <b> element is valid in HTML5 but with specific semantic meaning. It represents text to which attention is drawn for utilitarian purposes, without conveying any extra importance:

  • Keywords in a document abstract
  • Product names in a review
  • Lead sentences in articles
  • Actionable words in interactive text-driven software

Important distinction: The <b> element does NOT convey importance (use <strong> for that) or emphasis (use <em>). It's purely for stylistic offset where bold is the conventional presentation but no extra semantic weight is intended.

Syntax

<b>stylistically offset text</b>

The element is inline and requires both opening and closing tags.

Proper Usage

Keywords in Abstract

<p>This paper examines <b>machine learning</b>, <b>neural networks</b>, and <b>deep learning</b> algorithms.</p>

Product Names in Reviews

<p>The <b>iPhone 15 Pro</b> features improved camera capabilities.</p>

Lead Sentence (Article Lede)

<article>
  <p><b>Scientists have discovered a new species of deep-sea fish</b> in the Pacific Ocean, marking a significant breakthrough in marine biology.</p>
</article>

Examples

Incorrect Usage (Importance)

<!-- Don't do this -->
<p><b>Warning: This action cannot be undone.</b></p>

Correct Alternative for Importance

<!-- Use strong for importance -->
<p><strong>Warning: This action cannot be undone.</strong></p>

Incorrect Usage (Emphasis)

<!-- Don't do this -->
<p>I <b>really</b> need this to work.</p>

Correct Alternative for Emphasis

<!-- Use em for emphasis -->
<p>I <em>really</em> need this to work.</p>

Correct Usage (Stylistic Offset)

<!-- Keywords without importance -->
<p>The <b>Lorem Ipsum</b> text has been used as placeholder content since the 1500s.</p>

When to Avoid

Avoid using <b> when:

  • You want to convey importance (use <strong> instead)
  • You want to emphasize text (use <em> instead)
  • You're marking up headings (use <h1>-<h6> instead)
  • You want decorative bold text with no meaning (use CSS instead)
  • The bold text has specific semantic meaning covered by other elements

Remember: <b> is for stylistic offset without importance. If the text is important, emphasized, or has other specific meaning, use the appropriate semantic element instead.

  • <strong> - For text with strong importance (not just bold)
  • <em> - For emphasized text (not just italic)
  • <i> - For text in an alternate voice or mood (repurposed like <b>)
  • <mark> - For highlighted text
  • <span> - For purely decorative styling with CSS