Difference between strong and b tags in HTML
Both tags visually make text bold, but they have different purposes and semantic meaning.
— just visual emphasis
- Makes text bold without semantic load.
- Used only for styling.
html
<p>This is an <b>important</b> point in design.</p>- Doesn't tell browser or screen readers that text is important.
- Doesn't affect SEO.
— semantic emphasis of importance
- Makes text bold and indicates it's important information.
- Semantic tag — screen readers announce it with emphasis.
html
<p>This is <strong>important</strong> information!</p>- Improves accessibility (a11y).
- Can affect SEO, as search engines consider text importance.
Tip:
If you just want bold text — use CSS (
font-weight: bold;). If text has semantic importance — use<strong>.
Short Answer
Interview readyPremium
A concise answer to help you respond confidently on this topic during an interview.