The <b> tag in HTML is used to make the enclosed text bold, giving it greater emphasis or visual importance. Unlike the <strong> tag, which also makes text bold but with semantic importance. the <b> tag is purely for styling purposes and does not carry semantic meaning.
<p>This is a <b>bold</b> word in this sentence.</p>
Output:
This is a bold word in this sentence.Note: Alternatively, we can use the CSS font-weight property to bold text.
Using CSS font-weight Property
<p style="font-weight: bold">This is bold text using CSS</p>
Output:
This is bold text using CSS