HTML b tag

HTML b tag

Editorial Team
Editorial Team

The HTML <b> tag is an inline element that is used capture readers attention to it's content. This was once known as the Boldface element.


<b>Text displayed in bold</b>


<!DOCTYPE html>
    <title>HTML b tag<title>
    <p> Hello.. <b>This is Bold text.</b></p>


Hello.. This is Bold text.

The <b> tag should not be confused with <strong> tag. We usually use <b> tag to display names of something (Ex: name of a book) or a summary to draw the attention of a reader, but does not have have a special importance. On the other hand, <strong> tag is used to display some text that has special importance.

You should not use <b> tag to style the  text. Instead, you should use the CSS font-weight property.


<p style="font-weight:bold">This text is bold</p>


This text is bold

Join the conversation.