HTML-<b> Tag

Definition und Verwendung

<b> Der Tag definiert fett gedruckten Text ohne zusätzliche Bedeutung.

Weitere Informationen:

HTML Tutorial:HTML Text Formatting

HTML DOM Referenzhandbuch:Bold-Objekt

Beispiel

Beispiel 1

Einige Texte fett setzen (nicht als wichtig kennzeichnen):

<p>Das ist ein normaler Text - <b>Das ist fett gedruckter Text</b>.</p>

Try It Yourself

Beispiel 2

Fett gedruckten Text mit CSS setzen:

<p>Das ist ein normaler Text - <span style="font-weight:bold;">Das ist fett gedruckter Text</span>.</p>

Try It Yourself

Tips and Comments

Note:According to the HTML5 specification, the <b> tag should be the last choice and should only be used when there is no more appropriate tag. The specification states that <h1> to <h6> tags should be used to represent headings, <em> tags should be used to indicate emphasized text, <strong> tags should be used to indicate important text, and <mark> tags should be used to indicate marked/highlighted text.

Tip:You can also use the following CSS settings to make text bold:font-weight: bold;

Global Attributes

<b> The tag also supports Global Attributes in HTML.

event attributes

<b> The tag also supports Event Attributes in HTML.

Default CSS Settings

Most browsers will display the following default values <b> Element:

b {
  font-weight: bold;
}

Try It Yourself

Browser Support

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Support Support Support Support Support