<b>
b tag
The HTML <b>
tag is used to make text bold for visual emphasis. However, it does not convey any semantic importance, meaning it does not affect the content's meaning or influence search engine rankings. It is purely a styling element.
Syntax
<b>Bold Text</b>
b
Demo
This is normal text - and this is bold text.
<h1>The b element</h1>
<p>This is normal text - <b>and this is bold text</b>.</p>
Definition and Usage
The <b>
tag is used to make text bold but does not indicate importance or emphasis.
<b>
tag is primarily for styling purposes, whereas the <strong>
tag signifies important text.Example
Apply CSS to make text bold:
This is normal text - and this is bold text.
<h1>Use CSS to Set Bold Text</h1>
<p>This is normal text - <span style="font-weight:bold;">and this is bold text</span>.</p>
font-weight: bold;
.See also
Other elements for text formatting:
<a>
<em>
<strong>
<small>
<cite>
<q>
<dfn>
<abbr>
<time>
<code>
<var>
<samp>
<kbd>
<sub>
<sup>
<i>
<mark>
<ruby>
<rp>
<rt>
<bdo>
<span>
<br>
<wbr>
Conclusion
The <b>
tag in HTML is used to style text in bold for visual distinction without adding semantic meaning. Unlike the <strong>
tag, which conveys importance, the <b>
tag solely affects appearance. While it can be directly applied in HTML, using CSS (font-weight: bold;
) offers more flexibility and control over styling. Choosing the right tag depends on whether the goal is to emphasize content or simply change its appearance.
<address>
The HTML <address> element displays contact details for the nearest article or section's author, commonly used for email, phone numbers, or physical addresses in a semantic format.
<basefont>
The <basefont> tag defined a default font size and color for text in HTML, but it's no longer supported in HTML5, encouraging CSS usage instead.