This page introduces the essential Bootstrap 5 features used in our Hangman Stage 1 project. You'll learn what Bootstrap is, why we use it, and how to use its classes and components to build responsive, attractive web apps quickly and effectively.
Bootstrap 5 is a popular open-source CSS framework that helps you build modern, responsive websites quickly. It provides ready-to-use classes for layout, typography, buttons, forms, and more—so you can focus on your content and logic.
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
.container centers and pads your content..display-4, .text-center, .fw-bold, .mb-4 for headings, alignment, and spacing..btn, .btn-primary, .btn-outline-secondary for interactive elements..d-flex, .flex-wrap, .justify-content-center for flexible layouts..mb-3, .py-5, .mt-4 for margin and padding..alert, .alert-info for informational messages..navbar, .navbar-brand, .bg-primary for navigation.<div class="container py-5">...</div>
<h1 class="text-center mb-4">Hangman Game - Stage 1</h1>
<button class="btn btn-primary">Restart Game</button>
<a class="btn btn-outline-secondary" href="hangmanChatlogStg1.html">View AI Chatlog</a>
<div class="d-flex flex-wrap justify-content-center mb-3">...</div>
.container for centered, padded content. Use .d-flex and .flex-wrap for flexible layouts..display-4 for large headings, .fw-bold for bold text, .text-center for centered text..btn plus a color class (.btn-primary, .btn-outline-secondary) for styled buttons. Outline buttons fill with color on hover..mb-3 (margin-bottom), .py-5 (padding-y), etc., for spacing between elements..alert and .alert-info for info boxes..navbar, .navbar-brand, .bg-primary for a responsive navigation bar.<button class="btn btn-primary">Primary Button</button>
<button class="btn btn-outline-secondary">Outline Button</button>
<button class="btn btn-success">Success Button</button>
Try changing the color class (btn-primary, btn-success, etc.) to see different styles. Outline buttons are great for secondary actions and fill with color on hover.
.container and .row/.col for more complex layouts.btn-outline-* classes for buttons that fill on hover.mb-3, py-5, etc.) to keep your layout clean and readable.Explore the game, AI chatlog, HTML guide, and CSS guide to see how Bootstrap 5 brings everything together!