How to set font weight using Bootstrap classes with HTML?

Spread the love

Sometimes, we want to set font weight using Bootstrap classes with HTML.

In this article, we’ll look at how to set font weight using Bootstrap classes with HTML.

How to set font weight using Bootstrap classes with HTML?

To set font weight using Bootstrap classes with HTML, we use the font-weight classes.

For instance, we write

<p class="font-weight-bold">Bold text.</p>
<p class="font-weight-normal">Normal weight text.</p>
<p class="font-weight-light">Light weight text.</p>

to set text to bold with the font-weight-bold class.

font-weight-normal sets the text to normal font weight.

font-weight-light sets the text to lightfont weight.

Conclusion

To set font weight using Bootstrap classes with HTML, we use the font-weight classes.

Leave a Reply

Your email address will not be published.