<b>

Bold a text element using HTML.
2 min read
Believemy logo

The <b> tag is used to highlight text by making it bold (it's called b for bold πŸ‡ΊπŸ‡Έ).

Unlike other tags such as <strong>, the <b> tag does not add any particular meaning to the content; it is purely stylistic.

It is suitable for cases where you simply want to visually differentiate a portion of text without indicating that it is particularly important. πŸ˜‰

Β 

Structure and syntax of the <b> tag

Basic structure and syntax

The <b> tag is a container tag (it works in pairs) that surrounds the text you want to make bold. It has:

  • an opening tag <b>;
  • and a closing tag </b>.

Β 

Usage examples

For example, this text will be entirely in bold:

HTML
<b>This text is bold.</b>

But it is also possible to adjust the tags so that they only make certain parts of a paragraph bold:

HTML
<p>This <b>text</b> is partially <b>bold</b>!</p>

Give it a try yourself! πŸ˜‹

Β 

Attributes

The <b> tag has no specific attributes. However, like all HTML tags, it can accept classic attributes (for example, the class, id, and style attributes).

Β 

Browser compatibility

The <b> instruction is compatible with all browsers.

ElementGoogle ChromeSafariMozilla FirefoxEdge
<b>YesYesYesYes

Related terms

Discover our hTML and CSS glossary

Browse the terms and definitions most commonly used in HTML and CSS development.

Share this article

Want to help us? Share this article on your networks or even better: on your site, in an article or in your newsletter.