Turning Learners Into Developers
Codekilla
CODEKILLA
back to course
Lesson 05 / 5010%· free preview
Bootstrap 5 Basics5/32

BS5 Typography

Pre-styled headings, display headings, leads, marks, blockquotes, and helpers like text-muted / text-primary.

Headings & display headings

<h1> to <h6> look like W3Schools defaults. For oversized hero text use display headings:

html
<h1 class="display-1">Display 1</h1>
<h1 class="display-4">Display 4</h1>
Useful text utilities
ClassEffect
.leadLarger paragraph (intro text)
.text-mutedSoft gray
.text-primary / -success / -dangerBrand colors
.text-center / -end / -startAlignment
.text-truncateSingle-line ellipsis
.text-uppercase / -lowercase / -capitalizeCase
.fw-bold / -light / -normalFont weight
.fst-italic / -normalStyle
.text-decoration-line-through / -underline / -noneDecoration
Key Takeaways
  • Headings: .h1 to .h6 (CSS-only, doesn't change HTML semantics)
  • Display: .display-1 to .display-6 for large hero headings
  • Lead: .lead for emphasised opening paragraphs
  • Inline: .text-muted, .fw-bold, .fst-italic, .text-decoration-underline
Interview Questions

Practice Questions
  1. Use .display-1 for a hero headline.
  2. Apply .lead to an opening paragraph.
  3. Make a paragraph .text-muted .fst-italic.
Pro Tips
  • Customise font in Sass: $font-family-base: 'Inter', sans-serif;.
  • For body text use 16-18px — anything smaller loses readability on mobile.
AI-powered recap

Quick recap quiz?

We'll generate 5 MCQs from this lesson and check your understanding instantly. Takes ~30 seconds.

Ready to move on?
// example library
Want more hands-on snippets in Bootstrap?
Browse 1 runnable example · across 1 chapter · short, copy-paste-friendly · grouped by topic
Explore examples
// interactive playground
Visualize this concept in the DSA Visualizer
Run arrays · stacks · queues · linked lists · trees · heaps · hash tables — step-by-step animated walk-throughs.
Open DSA Visualizer
// feedback.matters()
Did this lesson help you?