HTML <b> Tag Tutorial - Usage, Syntax,
Attributes and Example

calender-iconPublished: 15 May 2025

clock-icon5-min read





INTRODUCTION

The HTML <b> element is used to draw attention of users towards text which does not have any special significance or importance by visually highlight it. In short it is used to visually highlight any general text.

The contents of <b> element is shown by browser in bold text. But it should not be used to make any text bold, you can use the font-weight property for that purpose.

It is mostly used for keywords in summary, product name in review or any normal text in paragraph which is to be boldfaced but is not important.

Syntax:
<b> --TEXT-- </b>

Example:

<p>
Inventors began to branch out at the start of the 19th century, creating the <b>de Rivaz engine</b>, one of the first internal combustion engines, and an early electric motor.
</p>

Inventors began to branch out at the start of the 19th century, creating the de Rivaz engine, one of the first internal combustion engines, and an early electric motor.

ATTRIBUTES

The HTML <b> element only has global attributes.

Usage Guidelines

  1. Historically, the <b> element was designed to render text in boldface. In HTML 4 it was deprecated in favour of CSS (font-weight: bold;) property for better separation of style and content. In HTML 5 this tag was redefined with a new role instead of being deprecated. Now, it is used for stylistic bolding without added importance
  2. Use the <b> tag for situations like highlighting keywords in a summary, displaying product names in a review, or emphasizing text that is typically bolded for styling purposes without adding extra significance.
  3. Do not use <b> element for titles and headings. You should use <h1>-<h6> elements.
  4. You can assign class to <b> element, so that you can style multiple <b> elements.
  5. To make text bold, you can use CSS font-weight property.

Tag Omission

The HTML <b> element must have both start tag and end tag.

Frequently Asked Questions (FAQ)

What is the Difference Between HTML b(bold) Tag and strong tag?
The <b> element is used to draw attention of users to text which is not important and strong element is used for text which is important. While both these elements are rendered same they have different semantic purposes and should be used accordingly.

What is the Difference Between HTML b(bold) Tag and br tag ?
In HTML, <b> and <br> serve completely different purposes:
The <b> tag is used to make text bold.
The <br> tag is used to insert a line break, forcing text to move to a new line.

How to make text bold in HTML?
You can use the HTML <b> tag that makes text bold visually, without implying text is important.

You can also use the CSS font-weight property with value as bold to make text bold (font-weight: bold).