Headings help organize content and show importance. They make pages easier to read and understand.
Display headings in Bootsrap
<h1 class="display-1">Heading 1</h1> <h2 class="display-2">Heading 2</h2> <h3 class="display-3">Heading 3</h3> <h4 class="display-4">Heading 4</h4>
Bootstrap provides display-1 to display-4 classes for large, stylish headings.
Use semantic tags like <h1> to <h6> for meaning, and add display classes for style.
display-1.<h1 class="display-1">Big Heading</h1>
display-2.<h2 class="display-2">Second Level Heading</h2>
display-3.<h3 class="display-3">Medium Heading</h3>
display-4.<h4 class="display-4">Smaller Heading</h4>
This page shows four headings with Bootstrap's display classes. Each heading is bigger and bolder than normal text, making them stand out clearly.
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Bootstrap Display Headings</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet"> </head> <body> <main class="container mt-5"> <h1 class="display-1">Display 1 Heading</h1> <h2 class="display-2">Display 2 Heading</h2> <h3 class="display-3">Display 3 Heading</h3> <h4 class="display-4">Display 4 Heading</h4> </main> </body> </html>
Always use semantic heading tags (<h1> to <h6>) for accessibility and SEO.
Bootstrap's display classes make headings larger and more stylish without extra CSS.
Use container and spacing classes like container and mt-5 to keep layout neat and responsive.
Headings organize content and show importance on a webpage.
Bootstrap display classes display-1 to display-4 style headings with big, bold text.
Use semantic tags with display classes for good structure and style.