← Back to Bootstrap Course | Chapter 3: Typography | Lesson 2 of 7

Display headings

Display headings are extra large, light headings for hero sections.

In this page:

  1. Display headings
Syntax
markup
<h1 class="display-1">Title</h1>
<h1 class="display-6">Title</h1>

Display headings

Use .display-1 to .display-6 for oversized titles that stand out from ordinary headings. They have a lighter weight and bigger sizes than h1. They are meant for short, impactful text.

Note: display-1 is the largest of the six.

Example: Display headings

markup
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body class="p-3">
<div class="container">
  <h1 class="display-1">Display 1</h1>
  <h1 class="display-4">Display 4</h1>
  <h1 class="display-6">Display 6</h1>
</div>
</body>
</html>
Live Example
Related Topics
Common Mistakes
  1. Using display headings for body text
  2. Skipping semantic heading tags
  3. Using too many on one page
Chapter Summary
  • display-1 to display-6
  • Larger than h1
  • Light font weight
  • Use sparingly for hero text
🔒

Chapter Quiz — Complete all 7 topics to unlock

0/7 topics done

Complete these topics first:

Login to run this code

C/C++/Java/PHP execution requires a free account. Your code is saved — you'll land right back in the editor after logging in.