Advertisement
❮ Previous: <audio> Next: <base> ❯

<b>

HTML <b> Tag

Example

<p>This is a <b>bold</b> text.</p>

Try this code ❯

Meaning

The <b> is inline element make text boldface.

Notes:

Do not confuse the <b> element with the <strong> , <em>, or <mark> elements.

The <b> element doesn't convey such special semantic information; use it only when no others fit.

Version: HTML 2, 3.2, 4, 4.01, 5


Standard Syntax

<b>...</b>


Advertisement

Global Attributes

<b> element also supports the Global Attributes in HTML.


Event Attributes

<b> element also supports the Event Attributes in HTML.


More Examples

If there is no semantic purpose to using the <b> element, you should use the CSS font-weight property with the value "bold" instead in order to make text bold.

Example

<p>This is a <span style="font-weight: bold">bold</span> text.</p>

Try this code ❯

By Default CSS Value(s)

Most of the browsers will display the <b> element with the following by default value(s)

Example

b {
  font-weight: bold;
}

Try this code ❯

Related Tags:

<a>,
<abbr>,
<b>,
<bdi>,
<bdo>,
<br>,
<cite>,
<code>,
<data>,
<dfn>,
<em>,
<i>,
<kbd>,
<mark>,
<q>,
<rp>,
<rt>,
<ruby>,
<s>,
<samp>,
<small>,
<span>,
<strong>,
<sub>,
<sup>,
<time>,
<u>,
<var> and
<wbr>

❮ Previous: <audio> Next: <base> ❯
Advertisement