A decade of Canvas at your command — powered by our custom cutting-edge, continuously trained AI engineStart Building →
Bootstrap 5April 6, 2026·8 min read

Bootstrap 5 Typography: Font Sizes, Weights, and Display Classes

Typography is one of the fastest ways to make or break a web layout — and Bootstrap 5 gives you a surprisingly powerful set of tools to get it right without writing much custom CSS. Whether you are setting up a SaaS homepage, a property platform, or a portfolio, understanding how Bootstrap handles font sizes, weights, and display headings will save you hours of tweaking.

Key Takeaways

  • Bootstrap 5 ships with a complete typographic scale — from utility classes for font size and weight through to oversized display headings — all usable without custom CSS.
  • Display classes (display-1 through display-6) are designed for hero sections and large headings where standard h1h6 tags are too restrained.
  • Font weight and line-height utilities let you fine-tune readability and hierarchy across any section of a page.
  • The Canvas Builder layout generator pairs directly with Bootstrap 5 typography, so you can prototype type-heavy layouts in minutes.

Bootstrap 5 Typography Defaults: What You Start With

Before touching a single class, Bootstrap 5 already sets sensible typographic defaults. The base font size is 16px (1rem), with a line height of 1.5 applied to the <body>. Headings h1 through h6 follow a consistent scale using rem units, which means they scale proportionally with the user’s browser font settings — an important accessibility detail that many developers overlook.

The default heading scale in Bootstrap 5 is:

Tag Default Size
h1 2.5rem (40px)
h2 2rem (32px)
h3 1.75rem (28px)
h4 1.5rem (24px)
h5 1.25rem (20px)
h6 1rem (16px)

Bootstrap also ships with .h1 through .h6 classes, which apply identical styles to any element — useful when you need the visual weight of a heading on a <p> or <span> without breaking document semantics.

<!-- Semantic heading -->
<h2>This is a heading</h2>

<!-- Same visual style on a paragraph -->
<p class="h2">This looks like an h2 but stays a paragraph</p>
a black and white photo of some type of letters
Photo by Taso Katsionis on Unsplash

Display Classes: When Standard Headings Are Not Enough

For hero sections, landing pages, and any place where you need text to command attention, Bootstrap 5 display classes are the right tool. The six classes — display-1 through display-6 — render text at sizes ranging from roughly 5rem down to 2.5rem, with a lighter font weight (300) and tighter line height than standard headings.

<h1 class="display-1">Massive Hero Title</h1>
<h1 class="display-2">Slightly Smaller</h1>
<h2 class="display-3">Section Hero Heading</h2>
<h2 class="display-4">Feature Block Title</h2>
<h3 class="display-5">Card Hero Text</h3>
<h3 class="display-6">Subtle Large Heading</h3>

A practical pattern for a hero section using the Canvas HTML Template would combine a display-2 or display-3 class with a lead paragraph and a call-to-action button — giving you a clear visual hierarchy without any custom CSS:

<section class="py-5 text-center">
  <div class="container">
    <h1 class="display-2 fw-bold">Build Better Layouts</h1>
    <p class="lead text-muted mb-4">
      AI-powered HTML generation for the Canvas template.
    </p>
    <a href="#" class="btn btn-primary btn-lg">Get Started Free</a>
  </div>
</section>

This same structure works well for free trial landing pages, where clear typographic hierarchy reduces friction and moves users toward conversion.

Bootstrap Font Size Utilities: The fs- Classes

Bootstrap 5 introduced fs- utility classes (fs-1 through fs-6) that mirror the heading size scale but apply only the font size — not the heading weight or margin. This is particularly useful for inline elements, labels, badges, and any case where you want size without heading semantics.

<p class="fs-1">Largest paragraph text (2.5rem)</p>
<p class="fs-3">Medium text (1.75rem)</p>
<span class="fs-5">Small label text (1.25rem)</span>
<small class="fs-6">Fine print at base size (1rem)</small>

Where display- classes are for impact, fs- classes are for precision. Use them when you need a specific size in a card subtitle, a stat callout, or a testimonial author line — anywhere the standard paragraph size is either too large or too small.

white and black box on white table
Photo by Brands&People on Unsplash

Font Weight and Style: fw- and fst- Classes

Typographic hierarchy is not just about size — weight and style do just as much work. Bootstrap 5 ships with a complete set of font weight utilities via the fw- prefix and font style utilities via fst-.

Available fw- classes:

  • fw-bold — weight 700
  • fw-bolder — bolder than the parent element
  • fw-semibold — weight 600
  • fw-medium — weight 500
  • fw-normal — weight 400 (default body)
  • fw-light — weight 300
  • fw-lighter — lighter than the parent element
<p class="fw-bold">Bold text — draws the eye immediately</p>
<p class="fw-semibold">Semibold — softer emphasis</p>
<p class="fw-light">Light weight — great for display captions</p>

<!-- Combine with display classes for refined hero text -->
<h1 class="display-3 fw-bold">Convert More Visitors</h1>
<h2 class="display-5 fw-light text-muted">Simple. Fast. Effective.</h2>

For font style, fst-italic applies font-style: italic and fst-normal resets it. These are particularly useful for quotes, captions, and testimonial blocks — the kind of components explored in detail in the post on Bootstrap 5 card components.

Lead Paragraphs and Text Utility Classes

The .lead class is one of Bootstrap’s most underused typographic tools. It increases paragraph font size to 1.25rem and reduces font weight slightly, making it ideal for introductory text, hero subtitles, and section openers that need to feel authoritative without competing with the heading above.

<h2 class="display-5 fw-bold">Why Typography Matters</h2>
<p class="lead">
  Good type choices communicate trust before a user reads a single word.
  Bootstrap 5 gives you the classes to get there without a design team.
</p>

Beyond .lead, Bootstrap’s text utilities cover a wide range of typographic adjustments:

  • Alignment: text-start, text-center, text-end (with responsive variants like text-md-start)
  • Transform: text-uppercase, text-lowercase, text-capitalize
  • Decoration: text-decoration-underline, text-decoration-none, text-decoration-line-through
  • Wrapping: text-wrap, text-nowrap, text-truncate
  • Colour: text-primary, text-muted, text-dark, text-white
<!-- Uppercase label above a heading -->
<span class="text-uppercase fw-semibold text-muted fs-6 d-block mb-2">
  Case Study
</span>
<h3 class="fw-bold">How Proptech Platforms Use Canvas</h3>
<p class="lead">A real-world example of display hierarchy in practice.</p>

This uppercase label pattern is used consistently in well-structured multi-section layouts — a technique covered thoroughly in Canvas Template section patterns.

Combining Classes for Real Bootstrap Design Patterns

Individual typography utilities become powerful when combined. A stat block, a pricing header, and a testimonial all call for different combinations of size, weight, and colour — but all built from the same Bootstrap classes.

<!-- Stat block -->
<div class="text-center py-4">
  <p class="display-4 fw-bold text-primary mb-0">98%</p>
  <p class="fs-5 fw-medium text-dark">Customer Satisfaction</p>
  <p class="fs-6 text-muted">Based on 2025 user survey</p>
</div>

<!-- Section intro -->
<div class="mb-5">
  <span class="text-uppercase fw-semibold fs-6 text-muted d-block mb-1">Features</span>
  <h2 class="display-6 fw-bold">Everything you need to ship fast</h2>
  <p class="lead text-muted">Built on Bootstrap 5, designed for Canvas.</p>
</div>

<!-- Testimonial -->
<blockquote class="border-start border-primary border-3 ps-4">
  <p class="fs-4 fw-light fst-italic">
    "Canvas Builder cut our build time by more than half."
  </p>
  <footer class="fs-6 fw-semibold text-muted">— Sarah T., Lead Developer</footer>
</blockquote>

These patterns require no custom stylesheet entries. Every size, weight, colour, and spacing value comes directly from Bootstrap 5’s utility layer — which is exactly what makes the framework so efficient for rapid prototyping and production builds alike. If you want to explore how these patterns translate into full page builds, the AI Prompt Helper can generate Canvas-compatible section prompts based on your layout goals.

Frequently Asked Questions

What is the difference between Bootstrap display classes and heading tags?

Standard heading tags (h1h6) apply a size scale with bold weight and document semantics. Display classes (display-1display-6) apply much larger sizes with a lighter font weight (300), intended purely for visual impact in hero sections and banners — they carry no additional semantic meaning beyond the tag they are applied to.

Can I use Bootstrap 5 font classes without the full Bootstrap framework?

The utility classes like fw-bold, fs-3, and text-uppercase are part of Bootstrap’s compiled CSS. You can use Bootstrap’s CDN for just the CSS layer if you do not need the JavaScript components, giving you access to all typography utilities with a single stylesheet link and no build step.

How do I change the default Bootstrap font to a custom Google Font?

Bootstrap 5 uses a native font stack by default. To override it, import your chosen Google Font in your <head> and then set body { font-family: 'Your Font', sans-serif; } in your custom CSS file. If you are using Sass, override the $font-family-base variable before importing Bootstrap.

Are Bootstrap 5 typography classes responsive?

Font size utilities (fs-) and display classes are not responsive by default — they apply a fixed size at all breakpoints. However, you can combine them with Bootstrap’s responsive display utilities or write breakpoint-specific overrides in your custom CSS. Alignment utilities like text-md-center are responsive out of the box.

What is the .lead class in Bootstrap 5 and when should I use it?

The .lead class increases paragraph text to 1.25rem with a slightly lighter weight, making it ideal for introductory text directly beneath a heading — in hero sections, feature intros, or the opening paragraph of a content block. It creates visual separation between the heading and the body copy without the full impact of a display class.

Getting typography right is one of the highest-leverage improvements you can make to any web layout. Bootstrap 5 gives you the full toolkit — from display headings to fine-grained weight and size utilities — and the try Canvas Builder free to see how these classes come together in production-ready Canvas sections without writing a single line of custom CSS.