Skip to content

<b> - The Bring Attention To Element

Inline HTML 2.0

The bring attention to element draws attention to text for utilitarian purposes without conveying extra importance or emphasis. It’s typically rendered in bold.

Result
<b>text to highlight</b>

The <b> element is for text that should be visually distinguished without semantic importance.

This is one of the most common sources of confusion in HTML:

<!-- Visual styling only, no semantic meaning -->
<p>Keywords: <b>blue</b>, <b>red</b>, <b>green</b></p>

Use <b> for keywords, product names, or text that needs visual distinction without importance.

Result
Result
Result
Result
Result
<!-- Don't use <b> for warnings -->
<p><b>Warning:</b> Do not mix with water.</p>

The <b> element has default bold styling, but you can customize it:

Result

Consider more semantic elements before using <b>:

<!-- Instead of this -->
<p>Published: <b>December 11, 2024</b></p>
<!-- Consider this -->
<p>Published: <time datetime="2024-12-11">December 11, 2024</time></p>

Screen readers typically don’t announce <b> differently from regular text. The bold styling is purely visual.

If the information is important, use semantic elements:

<p><b>Error:</b> Invalid input</p>
BrowserVersionNotes
Chrome1+Full support
Firefox1+Full support
Safari1+Full support
Edge12+Full support
IE3+Full support

The <b> element has been supported since the earliest browsers.