DEV Community

Cover image for HTML tags | strong-b
Carlos Espada
Carlos Espada

Posted on • Edited on

1

HTML tags | strong-b

<strong> is used to define a text that has great importance, seriousness or urgency, and is usually rendered visually in bold by the browser, while <b> is used exclusively to attract the attention of the reader by defining a text in bold, without no special importance.

Highly important content on a page can be a notice, a prominent phrase, or just a few words in the middle of a text.

Also the paragraph tags that represent notes or warnings within the text of a page. All of them will be marked with <strong>.

Do not confuse the use of <strong> with that of <em>, which is used to emphasize specific parts of a text (eg: <p> I <em>love</em> chocolate</p>).

<b> should be a last resort and only used when no other tag is available, never for styling. In case you want to use bold it is better to use the CSS font-weight property. If you want to indicate that the text it contains is of special importance then use <strong>.

Nor should you use <b> to highlight titles or headings, for that you will use <h1>-<h6> together with CSS.

Valid uses of <b> could be keywords in a summary, product names in a review, or other pieces of text whose typical presentation would be in bold but without adding special importance.

  • Type: inline / inline
  • Self-closing: No / No
  • Semantic value: No / No

Definition and example <strong> - Definition and example <b> | Support <strong> - Support <b>

Sentry blog image

How I fixed 20 seconds of lag for every user in just 20 minutes.

Our AI agent was running 10-20 seconds slower than it should, impacting both our own developers and our early adopters. See how I used Sentry Profiling to fix it in record time.

Read more

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please show some love ❤️ or share a kind word in the comments if you found this useful!

Got it!