1. Web Design
  2. HTML

HTML Element: b

Scroll to top
Read Time: 1 min

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

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.

Learn More

Advertisement
Did you find this post useful?
Want a weekly email summary?
Subscribe below and we’ll send you a weekly email summary of all new Web Design tutorials. Never miss out on learning about the next big thing.
Looking for something to help kick start your next project?
Envato Market has a range of items for sale to help get you started.