ScanSkill
CSS Examples

How to Make Text Bold using CSS

In this example, we will learn how to make text bold using CSS. We can use the font-weight property to make text bold.

Prerequisites

Example

HTML

        <span>This is a normal text</span>
        <span class="bold">This is a bold text</span>

CSS

        .bold{
            font-weight: bold;
        }

Output

How to Make Text Bold using CSS

Here, we used the font-weight: bold value to make a bold text. We can also set our desired value between 100, 200, 300, 400, 500, 600, 700, 800, and 900 in the font-weight property.

Conclusion

In this example, we learned how to make text bold using CSS. We used the font-weight: bold value to make the text bold. We can also set other values in the font-weight property.