HTML <b> Tag

The HTML <b> tag represents the HTML bold tag. As the name itself suggests, the HTML <b> tag displays the specified content in bold format and thus serves as a presentational element only. For writing a heading, the header tag <h1> to <h6> should be used. For writing an important statement the HTML <strong> tag should be used. And for marking or highlighting a text, the HTML <mark> tag should be used. The CSS ‘font-weight’ property can also be used to set bold text. The HTML <b> tag should be used only if no other tag is appropriate as specified by HTML5.

Difference between HTML <b> and <strong> tag:

The HTML <strong> tag is semantic and thus adds extra semantic meaning to the specified contents, whereas, the HTML <b> tag is explicit. The HTML <strong> tag is recommended.


<!DOCTYPE html>
<p><b>HELLO</b> WORLD!!</p>



In the above example, we used the HTML <b> tag to display a part of the text in bold format.

Global Attributes:

The HTML Global attributes are supported by the HTML <b> tag.

Event Attributes:

The HTML Event attributes are supported by the HTML <b> tag.

Supporting Browsers:

Chrome, IE, Firefox, Opera and Safari.

Please Share