how to use bootstrap 5 font bold with example

How to use bootstrap 5 font bold with example

bootstrap
21/01/24
Webvees

In this section, we'll see how to use font bold in Bootstrap 5.


Starting Bootstrap 5 Structure with CDN

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>Bootstrap 5 Font Bold</title>
    <link
      href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
      rel="stylesheet"
      integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN"
      crossorigin="anonymous"
    />
  </head>
  <body>
    <!-- content -->
    <script
      src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
      integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL"
      crossorigin="anonymous"
    ></script>
  </body>
</html>


Bootstrap 5 Font Bold

You can use fw-bold bootstrap 5 class to use Font Bold.

<p class="fw-bold">This is a bold text using Bootstrap 5</p>
bootstrap 5 fw-bold

bootstrap 5 fw-bold

Bold Text within a Heading

<h1>Welcome to <span class="fw-bold">Bootstrap 5</span> Tutorial</h1>
bootstrap 5 font bold with span tag

bootstrap 5 font bold with span tag

List Items with Bold Text

<ul>
    <li class="fw-bold">First Bold Item</li>
    <li>Second Item</li>
    <li class="fw-bold">Third Bold Item</li>
</ul>
bootstrap 5 font bold

bootstrap 5 font bold

Responsive Text with Bold and Normal Weights

<p class="fw-bold d-none d-md-block">This text is bold on medium devices and larger.</p>
<p class="fw-normal d-block d-md-none">This text is normal on small devices.</p>
bootstrap 5 responsive font bold

bootstrap 5 responsive font bold