<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.
Side-by-side comparison
#Meaning
Default style
Can be nested for a stronger effect
Effect on screen readers
When to use it
Example
#<p><strong>Note:</strong> save the file before closing the editor.</p>
<p>The new <b>React</b> course is now available.</p>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
#<strong>important text</strong>
<b>eye-catching text</b>More examples
#<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>Without looking at the code, you can’t tell them apart by eye. The difference is seen by the document, not the eye.
<p style="font-weight: bold;">Bold text with no semantic meaning at all.</p>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
#- <strong>Text of great importance: a warning, key information.
- <b>Draws attention to a piece of text without giving it any extra weight, e.g. keywords.
- <em>Stress in a sentence: a word that, read aloud, is pronounced with emphasis.
- <i>Text in a different tone or voice: foreign expressions, Latin names, a character’s thoughts, technical terms.
- <mark>Highlights a piece of text like a highlighter, because it’s relevant in the current context.
Spotted a mistake or missing an example? Write to us.