Learn the different ways to add Bootstrap to your project.
There are three primary ways to set up Bootstrap in your project:
Quick start, no download needed
Recommended for beginnersDownloaded files in your project
Offline accessPackage manager installation
For advanced projectsThe quickest way to get started! Link to Bootstrap's CSS and JS files online using jsDelivr — no download required.
Add these lines to your HTML file. Put CSS in
<head> and JS before closing
</body>:
CSS (in <head>):
JavaScript (before </body>):
bootstrap.bundle.min.js file
already includes Popper.js (required for dropdowns, tooltips, etc.).
Download the compiled CSS and JS files from the official website and include them in your project folder.
✓ Included:
✗ Not Included:
Project Structure:
Linking local files:
For Node.js powered apps. This allows you to manage Bootstrap as a project dependency and integrate with build tools like Webpack or Vite.
Using Bootstrap is simple: you add predefined class names to your HTML elements. These classes are already styled by Bootstrap!
HTML Code:
Output:
btn and
btn-primary classes do all the styling for you. No custom
CSS needed!
btn btn-danger
btn btn-success btn-lg
btn btn-outline-primary