font-weight --Make characters bold --Introduction to CSS [CSS3 compatible]

To make the characters bold , specify "font-weight: bold;" in the stylesheet (CSS).


<span style = "font-weight: bold;"> bold </span>

b What is the proper use of tags and style sheets (CSS) in bold?

You can also use the b tag to make the text bold. If you want to make only certain characters bold in the text, the b tag is easy.

Hello, welcome, all-you-can-eat .

Hello, welcome, <b> all-you-can-eat </b>.

If it is surrounded by div tag etc. and other settings are also made in the style sheet (CSS), "font-weight: bold;" is selected. If you specify it, you can do it together.

  .foo {
    font-weight: bold;
    padding: 10px 20px;
    border: 1px solid #ddd;

<div class = "foo">

Associated Information