ComparisonComparisons

<strong> vs <b>

<strong> marks content that is important, urgent or serious. <b> only draws attention to a piece of text, without adding any weight. Visually, both are bold.

On this page

Side-by-side comparison

#
  • Meaning

    <strong>
    Content that is important, urgent or serious
    <b>
    Text you draw attention to, with no added weight
  • Default style

    <b>
    Bold, identical to strong
  • Can be nested for a stronger effect

    <strong>
    Yes, greater weight
    <b>
    There’s no such convention
  • Effect on screen readers

    <strong>
    Some readers change their intonation
    <b>
    No extra signal
  • When to use it

    <strong>
    Warnings, key information
    <b>
    Keywords, product names in a review

Example

#
HTML
<p><strong>Note:</strong> save the file before closing the editor.</p>
<p>The new <b>React</b> course is now available.</p>
Preview

Definition and usage

#

<strong> carries meaning: a warning in a set of instructions, the most important sentence in a paragraph, a key piece of information the reader shouldn’t miss. <strong> elements can be nested to mark an even greater weight for a piece of text.

<b> is weaker in meaning. It draws the eye to a piece of text that isn’t more important than the rest, for example keywords in a summary or a product name in a review. Treat it as a last resort, for when no other element fits.

Visually, both elements look identical: the browser bolds them with the same style. The difference matters for screen readers and for the meaning of the document, not for appearance. If you just want bold text with no meaning attached, use CSS: font-weight: bold.

Syntax

#
Syntax
<strong>important text</strong>
<b>eye-catching text</b>

More examples

#
Both look identical
HTML
<p style="margin: 0 0 6px">This is an <strong>important</strong> warning.</p>
<p style="margin: 0">This is a <b>highlighted</b> keyword.</p>
Preview

Without looking at the code, you can’t tell them apart by eye. The difference is seen by the document, not the eye.

Plain bold with no meaning is a job for CSS
HTML
<p style="font-weight: bold;">Bold text with no semantic meaning at all.</p>
Preview

Good practices

#
  • If a piece of text is genuinely important or carries a warning, choose <strong>.
  • Reserve <b> for situations where nothing else fits, e.g. keywords in a summary.
  • Set plain bold with no meaning in CSS: font-weight: bold.

Related entries

#

Spotted a mistake or missing an example? Write to us.