agyanadda@gmail.com

Bootstrap Introduction

Bootstrap Basics 1 min read Updated Dec 1, 2026 Topic 1 of 32

Bootstrap is a free, open-source CSS framework: a ready-made collection of CSS classes and JavaScript components. Instead of writing all the CSS yourself, you add classes like btn btn-primary and get a styled, responsive button.

Why use Bootstrap?

  • Fast development — build pages in hours, not days
  • Responsive — a 12-column grid that adapts to phones, tablets and desktops
  • Consistent design — buttons, forms and cards look the same everywhere
  • Ready components — navbar, modal, carousel, dropdowns, accordion
  • Works in all modern browsers

What is new in Bootstrap 5?

  • No jQuery — components use plain JavaScript
  • New utility API, more spacing and colour helpers
  • An extra breakpoint xxl for large screens
  • CSS variables for easy theming, and dark mode (data-bs-theme="dark")

What you need to know first

Basic HTML and CSS. Bootstrap does not replace them — it builds on top of them.

Example

Example — A page styled only with Bootstrap classes HTML
<!DOCTYPE html>
<html lang="en">
<head>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
  <div class="container py-5 text-center">
    <h1 class="display-5 fw-bold text-primary">Hello, Bootstrap!</h1>
    <p class="lead">No custom CSS — only Bootstrap classes.</p>
    <button class="btn btn-success btn-lg">Get started</button>
  </div>
</body>
</html>

container, py-5, text-center, display-5, lead and btn are all Bootstrap classes.

Try it Now »

Test Yourself With Exercises

Exercise 1 Multiple Choice

What is Bootstrap?

Exercise 2 True / False

Bootstrap 5 requires jQuery.

Exercise 3 Fill in the Blank

The Bootstrap grid is divided into ___ columns.

Frequently Asked Questions

Yes. Bootstrap is built on CSS. Knowing CSS helps you understand the classes and customise designs when Bootstrap is not enough.