HTML Tags

HTML <b> Tag

The <b> tag in HTML is used to bolden text without adding extra importance or emphasis.
It visually highlights content by making it bold, often used for keywords, product names, or other text that needs attention — but not strong semantic meaning.
For emphasizing text semantically, you should use the <strong> tag instead.

Syntax

<b>Bold text here</b>

Attributes

AttributeDescription
classAssigns one or more class names for styling.
idAssigns a unique identifier to the bold text.
styleAdds inline CSS styles to customize the appearance.
titleProvides additional information as a tooltip.

Example

<!DOCTYPE html>
<html>
<head>
  <title>B Tag Example</title>
  <style>
    .highlight {
      color: #29AB87;
      font-weight: bold;
      background-color: #f0f0f0;
      padding: 2px 4px;
      border-radius: 4px;
    }
  </style>
</head>
<body>
  <h1>HTML &lt;b&gt; Tag Example</h1>
  <p>
    The &lt;b&gt; tag makes text <b class="highlight" id="keyword" title="Bold Text">bold</b> without changing its meaning.
  </p>
  <p>
    Example: This is a <b>bold statement</b> in a paragraph.
  </p>
</body>
</html>

Output

Browser Output

Use our TryIt Editor to see the output.

Browser Support

Chrome
Chrome
Firefox
Firefox
Edge
Edge
Safari
Safari
Opera
Opera
IE
IE9+
✅Yes✅Yes✅Yes✅Yes✅Yes✅Yes

The <b> tag displays text in bold weight to make it stand out visually, without adding semantic importance.

Notes

  • The <b> tag is used purely for visual styling — it doesn’t convey importance or emphasis.
  • For important or emphasized text, prefer <strong> or <em>.
  • The default browser style makes <b> text bold, but this can be customized with CSS.
  • It is an inline element, meaning it doesn’t start on a new line.

Conclusion

The <b> tag is useful for visually highlighting text without changing its meaning.
It’s best for stylistic purposes like marking keywords or names, while <strong> should be used for important or emphasized content.

Sign In Form

User your email and password to singn in

Don’t have an account, signup here : 

HTML5 & CSS3

Tools and Tutorials

Want a Website

Want a website for your business ?

Please fill out the details below, so we can reach out to you.

Registration Form

Signup to track your record and much more.

We have sent you an email with a registration link. Please click the link to verify your email address, or enter the 6-digit OTP provided in the email.

Didn't receive the OTP. Regenerate OTP Resend