Signup/Sign In
LAST UPDATED: JUNE 2, 2020

HTML b (bold) Tag

HTML <b> tag or bold tag is used to make the text appear bold on a webpage. HTML provides us a set of tags/elements that are used for the text formatting or in simple words, we can provide some basic styling to the text by applying some formatting features like bold, italics, etc.

Now in this, we are going to learn about the <b> tag or bold tag.

  • The <b> tag comes under the category of physical style elements and is used to display the text in BOLD.

  • The text enclosed inside the starting and ending tags of the <b> tag appear bold in the web browser.

  • This <b> tag can be used to highlight the important text of the content displayed on a webpage.

  • Also, this is an inline element.

HTML <b> Tag - Syntax and Usage

The <b> tag requires both opening (start) tag and closing(end) tag.

Required syntax for the same is given below:

<b>
    text to show in bold
</b>

HTML <b> Tag Basic Example

Below we have a basic example for a clear understanding of the <b> tag:

HTML <b> tag Attributes

This element does not have any specific attributes although this element supports Global attributes and Event attributes.

Points To Remember!

  • Use the Bold tag only when it is required means do not use <b> tag in excess.

  • For Headings, you can use <h1>...<h6>, rather than the bold tag.

  • For emphasized text, you can use the <em> tag(HTML <em> tag), as it is treated with importance by the browsers and search engine.

  • For some important text, you can use the <strong> tag(HTML <strong> tag), which will also make the text bold, along with marking the text as important too, for search engines crawling the webpages.

Default CSS Style for HTML <b> tag

The default CSS Style or value for <b> tag is as shown below:

b {
    font-weight: bold;
}

Browser Support for HTML <b> tag

Following browsers support this attribute:

  • Firefox 1+

  • Google Chrome 1+

  • Internet Explorer 2+

  • Apple Safari 1+

  • Opera 2.1+



About the author:
Aspiring Software developer working as a content writer. I like computer related subjects like Computer Networks, Operating system, CAO, Database, and I am also learning Python.