BS5 Get Started

Set up Bootstrap 5 using CDN or local installation and create your first responsive page.

On this page

Using Bootstrap via CDN

The fastest way to start using Bootstrap 5 is via CDN.

<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>

Minimal starter template

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Bootstrap 5 Example</title>
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>

  <div class="container">
    <h1 class="text-primary">Hello Bootstrap 5</h1>
  </div>

  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

Local installation

You can download Bootstrap files and include them manually in your project.

Important meta tag

The viewport meta tag is required for proper responsive behavior:

<meta name="viewport" content="width=device-width, initial-scale=1">

JavaScript bundle

Use the bundle version to include Popper automatically.

BS5 Get Started Examples (8)