Description
HTML element <b> is used to display a text with bold style, without any extra importance.
This is one of the text formatting elements used to format a text without any additional CSS styles.
The below table summarizes its usage.
| Usage Details | |
| Placement | It is displayed as an Inline element. |
| Contents | It can contain Inline elements and text. |
| Tags | Both opening and closing tags are required. |
| Versions | HTML 2, 3.2, 4, 4.01, 5 |
Syntax
<b>...</b>
Examples
<p>This paragraph contains a <b>bold</b> text.</p>
Attributes
The following table shows the list of supported and unsupported attributes for the <b> tag.
| Attribute Type | Details |
| Tag-Specific Attributes | The tag <b> does not have any tag-specific attributes. |
| Global Attributes | Like all other HTML tags, the tag <b> supports the HTML Global Attributes. |
| Event Attributes | The tag <b> also supports the HTML Event Attributes. |
Browser Compatibility
The tag <b> is supported in all modern browsers.
- Google Chrome 1+
- Internet Explorer or Edge 2+
- Firefox 1+
- Apple Safari 1+
- Opera 2.1+