HTML <b>

BrandonDusch's avatar
Published Mar 15, 2022Updated Jul 1, 2022
Contribute to Docs

The <b> element is used to draw the reader’s attention to the marked text without assigning any additional importance to it. This is typically done by making the text bold.

Note: Original legacy usage of this tag is just to set text as bold, but it should now be avoided for solely styling text. Best practice to use CSS for text formatting. The CSS element used for making boldface text is font-weight.

  • Front-end engineers work closely with designers to make websites beautiful, functional, and fast.
    • Includes 34 Courses
    • With Professional Certification
    • Beginner Friendly.
      115 hours
  • Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.
    • Beginner Friendly.
      7 hours

Syntax

<b>
<!-- Text to draw attention to here -->
</b>

The <b> element should only contain text or other tags meant for text content.

Example

<p>Please pay attention to <b>this</b> word.</p>

All contributors

Contribute to Docs

Learn HTML on Codecademy

  • Front-end engineers work closely with designers to make websites beautiful, functional, and fast.
    • Includes 34 Courses
    • With Professional Certification
    • Beginner Friendly.
      115 hours
  • Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.
    • Beginner Friendly.
      7 hours