What Is The HTML <b> Tag?

What Is The HTML b Tag

Date First Published: 5th December 2022

Topic: Web Design & Development

Subtopic: Web Development

Article Type: Computer Terms & Definitions

Difficulty: Medium

Difficulty Level: 4/10

Learn more about what the HTML <b> tag is in this article.

The HTML <b> tag is found within the <body> tag and is used to make text bold without adding any extra importance to it. Text within the opening and closing tags is made more obvious for the user and may be used to put emphasis on information that the website owner does not want users to miss. It is useful for making certain text stand out, such as the definition of a word or phrase.

Note: Info Icon

According to the HTML5 specification, the <b> tag should only be used as a last resort when no other tag is more suitable. The specification states that emphasised text should use the <em> tag, important text should use the <strong> tag, and marked/highlighted text should use the <mark> tag.


Note: Info Icon

Do not use the <b> tag tag for titles and headings. Instead use the <h1> to <h6> tags to create headings.

Example Of The HTML <b> Tag

Below is an example of the <b> tag. The appearance of it can be adjusted in CSS and it has the following default values:

b { font-weight: bold; }

<p>By default, text within this tag displays in <b>bold</b></p>

Output:

By default, text within this tag displays in bold.

Difference Between The <strong> Tag and The <b> Tag

The main difference between the <strong> tag and <b> tag is that the <b> tag is used to draw attention to text and the <strong> tag is used to indicate that the text is an important word or section of the document and semantically highlight it. The difference between these two tags is unobvious at first as both are shown in bold. However, according to the W3C, a bold tag must always be displayed in bold and this is optional for a strong tag. Text within the strong tags does not have to be displayed in bold.


Feedback

  • Is there anything that you disagree with on this page?
  • Are there any spelling, grammatical, or punctuation errors on this page?
  • Are there any broken links or design errors on this page?

If so, it is important that you tell me as soon as possible on this page.