For text with strong importance or urgency. Learn more →
<b> ElementThe bring attention to element draws attention to text for utilitarian purposes without conveying extra importance or emphasis. It’s typically rendered in bold.
<b>text to highlight</b>The <b> element is for text that should be visually distinguished without semantic importance.
<b> vs <strong>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.
<!-- Indicates strong importance --><p><strong>Warning:</strong> This action cannot be undone.</p>Use <strong> for text with serious importance or urgency.
<!-- Don't use <b> for warnings --><p><b>Warning:</b> Do not mix with water.</p><!-- Use <strong> for important warnings --><p><strong>Warning:</strong> Do not mix with water.</p>The <b> element has default bold styling, but you can customize it:
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><p><strong>Error:</strong> Invalid input</p><!-- or --><p role="alert"><strong>Error:</strong> Invalid input</p>| Browser | Version | Notes |
|---|---|---|
| Chrome | 1+ | Full support |
| Firefox | 1+ | Full support |
| Safari | 1+ | Full support |
| Edge | 12+ | Full support |
| IE | 3+ | Full support |
The <b> element has been supported since the earliest browsers.
For text with strong importance or urgency. Learn more →
For stress emphasis (typically italic). Learn more →
For highlighted or marked text. Learn more →