HTML Bold Element

HTML Bold <b> tag is used to make text bold in HTML document. Please note that using Bold tag to mark some text does not make the text important.

Example

A simple Bold element is shown in the following example.

index.html

Note: HTML Bold element starts with the tag <b> and ends with an end tag </b>.

ADVERTISEMENT

Default CSS for Bold

By default, following CSS properties are set for a Bold element.

font-weight: bold;

Inline Style for HTML Bold

We can change the style of Bold element through inline styling using style attribute.

In the following example, we have set the color as red for the Bold element.

index.html

Apply CSS for Bold Element

We can apply CSS for all Bold elements using the b tag.

index.html

Conclusion

In this HTML Tutorial, we learned about HTML Bold tag and went through different examples that cover defining a Bold element, and styling it.