HTML <b> Tag
Definition and Usage
<b>
The tag specifies bold text without any additional importance.
See also:
HTML Tutorial:HTML Text Formatting
HTML DOM Reference Manual:Bold Object
Instance
Example 1
Make some text bold (do not mark it as important):
<p>This is plain text - <b>This is bold text</b>.</p>
Example 2
Set bold text using CSS:
<p>This is plain text - <span style="font-weight:bold;">This is bold text</span>.</p>
Tips and Comments
Note:According to the HTML5 specification, the <b> tag should be the last choice, only to be used when there is no more suitable tag. The specification indicates that <h1> to <h6> tags should be used for headings, <em> tags for emphasized text, <strong> tags for important text, and <mark> tags for marked/highlighted text.
Tip:You can also use the following CSS settings to make text bold:font-weight: bold;
Global Attributes
<b>
The tag also supports Global Attributes in HTML.
event attributes
<b>
The tag also supports Event Attributes in HTML.
Default CSS Settings
Most browsers will display the following default values <b>
Element:
b { font-weight: bold; }
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |