Class 8 of 48 • Content & Typography

Bootstrap 5 Typography: Headings, Display Classes & Lead Text

Typography forms the backbone of digital communication. Bootstrap 5 provides a modern, clean typography scale built on modern system font stacks (San Francisco, Segoe UI, Roboto, and Helvetica Neue). It features Responsive Font Sizing (RFS), ensuring your headings scale smoothly down on mobile viewports to prevent awkward line breaks and layout overflow.

Bootstrap 5 Typography Scale: Headings, Display Classes, and Responsive Font Sizing
Figure 8: Typography typographic hierarchy from Display 1-6 down to standard headings and body copy with automated RFS scaling.

1. Standard Headings (<h1> through <h6>)

Bootstrap normalizes all HTML heading elements, providing standardized rem font sizes, tight line heights, and margin resets. You can also use heading classes (.h1 through .h6) to visually style non-heading elements without altering semantic heading hierarchy:

Heading Element Computed Desktop Font Size Visual Preview
<h1> or .h1 2.5rem (40px)
h1. Bootstrap Heading
<h2> or .h2 2.0rem (32px)

h2. Bootstrap Heading

<h3> or .h3 1.75rem (28px)

h3. Bootstrap Heading

<h4> or .h4 1.5rem (24px)

h4. Bootstrap Heading

<h5> or .h5 1.25rem (20px)
h5. Bootstrap Heading
<h6> or .h6 1.0rem (16px)
h6. Bootstrap Heading

2. Display Headings (.display-1 through .display-6)

When building hero banners, landing page headers, or portfolio showcases, traditional headings may feel too understated. Bootstrap 5 provides six high-impact Display Headings with larger font sizes, thinner font weights, and graceful responsive scaling:

<h1 class="display-1">Display 1 (5rem / 80px)</h1>
<h1 class="display-2">Display 2 (4.5rem / 72px)</h1>
<h1 class="display-3">Display 3 (4rem / 64px)</h1>
<h1 class="display-4">Display 4 (3.5rem / 56px)</h1>
<h1 class="display-5">Display 5 (3rem / 48px)</h1>
<h1 class="display-6">Display 6 (2.5rem / 40px)</h1>

3. Lead Paragraphs & Inline Styling

To make your opening introductory paragraph stand out, apply the .lead class. It increases the font size (1.25rem) and reduces font weight (300):

<!-- Lead introductory paragraph -->
<p class="lead">
  Bootstrap 5 is designed to help students, designers, and developers build clean, mobile-first websites faster than ever.
</p>

<!-- Inline text utilities -->
<p>You can use <mark>highlight text</mark> with mark class.</p>
<p><del>This text is treated as deleted.</del></p>
<p><ins>This line is an extra insertion.</ins></p>
<p><small class="text-body-secondary">Fine print / disclaimers using small class.</small></p>

4. Accessible Blockquotes with Citations

Quotes from articles, customer testimonials, or academic references should be wrapped in semantic <blockquote> tags using the .blockquote class:

<figure>
  <blockquote class="blockquote">
    <p>"Good design is as little design as possible."</p>
  </blockquote>
  <figcaption class="blockquote-footer">
    Dieter Rams in <cite title="Source Title">Ten Principles for Good Design</cite>
  </figcaption>
</figure>

Advance Architecture: Responsive Font Sizing (RFS) Engine

Bootstrap 5 ships with RFS (Responsive Font Sizing) enabled by default in Sass. RFS dynamically calculates font sizes using CSS clamp() and calc() functions, allowing font sizes to smoothly adapt between a minimum mobile size and a maximum desktop size without requiring dozens of manual media queries!

Explore Related Bootstrap Tutorials & Next Steps

Strengthen your responsive web design mastery by studying these connected classes:

Colors & Text Utilities

Style typography with contextual text colors, opacity, and backgrounds.

Responsive Table Typography

Format tabular data with clean typography and contextual styles.

Buttons & Text Styling

Create attractive call-to-action buttons with custom typography.

Accessible Typography & WCAG

Ensure text contrast ratios, readable line heights, and screen reader labels.

Frequently Asked Questions (FAQ) - Student & Interview Review

<h1> is a semantic HTML heading with a font size of 2.5rem (40px) and bold font weight (500). .display-1 is a visual presentation class with a massive font size of 5rem (80px) and lighter font weight (300), typically used for hero banners.
Bootstrap 5 uses the modern native system font stack: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', 'Noto Sans', 'Liberation Sans', Arial, sans-serif. This provides instant rendering speeds because zero web font files need to be downloaded.
Apply the .text-truncate class. It sets overflow: hidden; text-overflow: ellipsis; white-space: nowrap; to safely truncate text with an ellipsis on a single line.

Next Step in Your Bootstrap Learning Path:

Advance your practical frontend engineering skills with the next topic in our synchronized curriculum.

Continue to Class 9: Colors & Backgrounds → Previous: ← Class 7: Native CSS Grid | Full Syllabus

Share Share on Facebook Share on Twitter Share on LinkedIn Pin on Pinterest Share on Reddit

You may also like this!