In this example, we will learn how to make text bold using CSS. We can use the font-weight
property to make text bold.
HTML
<span>This is a normal text</span>
<span class="bold">This is a bold text</span>
CSS
.bold{
font-weight: bold;
}
Output
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.
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.