✦ A decade of Canvas craft, now driven by AI — describe it, watch it build live.Start building
Bootstrap 5Content

Bootstrap 5 Display Heading

Bootstrap 5 Display Headings are oversized heading styles — `.display-1` through `.display-6` — designed for hero sections, landing pages, and anywhere you need text to command immediate visual attention beyond what standard `<h1>`–`<h6>` tags provide. They apply larger font sizes and lighter font weights than default headings, creating a typographic hierarchy suitable for high-impact layouts. Use them when standard headings feel too restrained and the page calls for bold, editorial-style typography.

Primary Class

.display-heading

Common Use Cases

  • Hero section taglines on SaaS landing pages, where a single punchy line like 'Ship faster. Break nothing.' needs to fill the viewport without feeling crowded
  • Event or conference sites displaying the event name and date at maximum visual weight so it reads clearly in both desktop banners and mobile previews
  • Portfolio homepages where a designer or agency uses a `.display-1` or `.display-2` headline to establish a premium, confident brand voice before any body copy appears
  • Pricing page section titles that separate plan tiers — using `.display-5` or `.display-6` to distinguish section headers from body text without pulling in a custom typeface

Variants & Classes

VariantDescription
Display Heading DefaultStandard display heading with Bootstrap's default styling.
Display Heading ResponsiveResponsive variant that adapts to different screen sizes.

Code Example

<section class="py-5 text-center">
  <h1 class="display-1 fw-bold">Build something people love.</h1>
  <p class="display-6 text-muted">No-code tools that get out of your way.</p>
  <p class="lead mt-3">CanvasBuilder turns your idea into a live, production-ready website in minutes — powered by Bootstrap 5.</p>
  <a href="#" class="btn btn-primary btn-lg mt-3">Start for free</a>
</section>

Live Examples

Basic Display Heading

Example 1

Canvas Framework Variants

The Canvas template extends Bootstrap 5 with 1,658+ component variants. Generate any of these using Canvas Builder:

  • Canvas Builder generated display heading with custom colours
  • Display Heading with interactive states
  • Responsive display heading for all screen sizes

Best Practices

Pair display sizes intentionally for hierarchy

Use `.display-1` or `.display-2` for the primary headline and drop two levels — e.g. `.display-4` — for a subtitle. Jumping only one level often produces headings too similar in size to read as distinct hierarchy.

Override font-weight to control tone

Bootstrap's display headings default to a lighter weight (`font-weight: 300`). Add `.fw-bold` or `.fw-semibold` when the design needs punch — particularly on dark backgrounds where thin strokes can lose contrast.

Fluid sizing with CSS clamp for responsive display text

Bootstrap 5 doesn't fluid-scale display headings by default. Override with `font-size: clamp(2rem, 6vw, 5rem)` in your custom CSS to prevent text overflow on small screens without relying solely on breakpoint utility classes.

Keep display headings to one or two lines

At `.display-1` sizes a heading beyond two lines will dominate the entire viewport. If your copy runs longer, step down to `.display-3` or `.display-4` rather than reducing font-size with utility overrides, which break the spacing relationships.

FAQ

What is the actual font size difference between a standard `<h1>` and a `.display-1` in Bootstrap 5?
Bootstrap 5 sets `<h1>` at `2rem` (32px at default browser size). `.display-1` renders at `5rem` (80px) with a font-weight of 300. The display scale runs from `5rem` down to `2.5rem` for `.display-6`, so even the smallest display class is larger than a standard `<h1>`. These values are controlled by the Sass variables `$display-font-sizes`, `$display-font-weight`, and `$display-line-height`, all of which you can override in a custom build.
How do I change the colour or font-family of a display heading to match my brand?
Apply Bootstrap's text colour utilities directly — e.g. `class="display-2 text-primary"` — or target the class in your stylesheet with `[class*='display-'] { color: #your-hex; }`. To swap the typeface, override `$display-font-family` in Sass before importing Bootstrap, or add `font-family: 'YourFont', sans-serif;` in your custom CSS after Bootstrap's stylesheet. Avoid inline styles; they're harder to maintain and block theming.
How does CanvasBuilder handle Display Headings when generating a page?
When you describe a hero or landing section in CanvasBuilder, the AI selects the appropriate `.display-*` class based on the visual weight you specify — choosing `.display-1` for full-bleed heroes and `.display-4` or `.display-5` for section titles within content areas. It applies your brand's primary colour via Bootstrap's CSS custom properties and outputs semantic HTML using the correct heading tag (`<h1>`, `<h2>`, etc.) so the display class handles only visual styling while document structure remains accessible.