HTML Element: b
Andy Leverenz
•
1 min read
The HTML <b> element allows you to make text bold (it stands for “bold”) and is used to add emphasis to text.
In HTML5, the <b> element has been deprecated in favor of the <strong> element, which has the same effect whilst also adding semantic meaning to the text.
Example
Here’s an example of how to use the <b> element to make some text bold:
Syntax
1 |
<p>Hey there, <b>friend</b>! How’s it going?</p> |
Result
Please
accept marketing cookies
to load this content.
Attributes
The <b> element doesn’t have any specific attributes, but it’s important to note that it’s a presentational element, meaning it’s used for styling rather than for content or structure. In HTML5, it’s recommended to use the <strong> element instead, which has the same effect but also adds semantic meaning to the text.
Content
The <b> element is used to make text bold, so you can put any text you want inside it.
Did You Know?
- The
<b>element has been around since the very beginning of HTML, when it was first introduced in 1993! - You can use CSS to style the
<b>element or any other element on your website.






