HTML b tag

HTML <b> tag

Use of <b> tag

The <b> tag defines the bold texts. The texts within the <b> tag & </b> tag will be displayed boldly. It is used to draw attention to the texts.
Type: Inline Element

Example of <b> tag

<b> Bold Texts </b>

Supported Browsers

Tag Chrome browser Internet explorer browser Firefox browser Safari browser Opera browser
<b> Yes Yes Yes Yes Yes

Full Code Examples

<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>
These are normal texts.
</p>
<p>
<b> These are bold texts. </b>
</p>
</body>
</html>

Output

These are normal texts.
These are bold texts.

You see that the texts within the <b> and </b> tag is bold.

More Reference

Note that <b> tag should not be used frequently. It can be used only when other tags are not appropriate. For writing heading, use <h1> - <h6> which is bold by default. If you want to make strong texts use <strong> tag and to make emphasized texts use <em> tag.
You can also use the CSS "font-weight" property to make bold text.

<!DOCTYPE html>
<html>
<head>
<style>
p {
font-weight: bold;
}
</style>
</head>
<body>
<p>
These are bold texts.
</p>
</body>
</html>