Publish in HTML Tutorial el 23/05/2025 17:08
The HTML <b>
element is used to draw attention to text without implying any added importance or emphasis. It simply makes the text appear in boldface. Unlike <strong>
, which indicates semantic importance, <b>
is purely presentational.
Here's how the <b>
element is written in HTML:
Rendered result: This text will be bold
The simplest use case for the <b>
element:
Highlighting key parts of list items:
Using JavaScript to toggle bold formatting:
Using <b>
to emphasize table headers:
Making text bold on mouseover with JavaScript:
font-weight: bold;
instead when you need to apply bold styling to multiple elements for better performance.<b>
as it can make text harder to read when overdone.<b>
with other elements like <i>
for bold italic text.<b>
elements differently unless CSS is applied.<strong>
instead of <b>
.The <b>
element is supported by all browsers, including:
The <style> HTML element contains style information for a document, or part of a document. ...
The <strong> element is used to indicate that its content has strong importance, seriousnes...
The <span> element is an inline container used to mark up a part of a text or document. Unl...
The <source> element is used to specify multiple media resources for media elements like &l...
The <small> element is used to represent side-comments and small print, typically for discl...
HTML <section> Element: The Complete Guide The <section> element is a semantic HTML ...