Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why this class "font-weight-bold" doesn't work? [Bootstrap]

  <head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="/css/bootstrap.css">
  </head>
  <body>

    <h1 class="h1">Bootstrap</h1>
    <p class="font-weight-bold">Palabra</p>
    <p class="font-italic">Palabra</p>

  </body>
</html>

Adding "font-weight-bold" class to a p doesn't make any change to the text

No change

What can i do?

like image 397
josmanuel Avatar asked Sep 12 '25 15:09

josmanuel


2 Answers

It's font-weight-bold for Bootstrap 4

And class="fw-bold" for Bootstrap 5

like image 174
Soheb Avatar answered Sep 15 '25 06:09

Soheb


Using class= "fw-bold" worked for me. I am working with bootstrap 5.

like image 28
Oscar Avatar answered Sep 15 '25 05:09

Oscar