CDN Quickstart
The official guide for how to include Bootstrap’s CSS and JavaScript in your project using a CDN.
Get started using Bootstrap in seconds by including our production-ready CSS and JavaScript by using a CDN without the need for any build steps. CDNs provide copies of Bootstrap's codebase that's ready to be used in any environment with minimal code changes required on your part.
Got the gist already? See the end result in this Bootstrap CodePen demo.
-
Create a new
index.htmlfile in your project root. Include the<meta name="viewport">tag as well for proper responsive behavior in mobile devices.<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Bootstrap demo</title> </head> <body> <h1>Hello, world!</h1> </body> </html> -
Include Bootstrap’s CSS and JS. Place the
<link>tag in the<head>for our CSS, and the<script>tag for our JavaScript bundle (including Popper for positioning dropdowns, popovers, and tooltips) before the closing</body>. Learn more about our CDN links.<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Bootstrap demo</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-N0uF9hqZ8qhqibHeG7LIFuGvat9Se79BGu0Q/BGYKKgeu8FQd8zVih3hdD2RgaKt" crossorigin="anonymous"> </head> <body> <h1>Hello, world!</h1> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js" integrity="sha384-ilcRHUqiqfQ8he/Z33RWUckID8qJcGSlQV+xPa0F5TdNjdyBM7Zt/D6iR6rUoaKV" crossorigin="anonymous"></script> </body> </html>You can also include Floating UI and our JS separately. If you don’t plan to use dropdowns, popovers, or tooltips, save some kilobytes by not including Popper.
<script src="https://cdn.jsdelivr.net/npm/@floating-ui/dom@1.7.0/dist/floating-ui.dom.umd.min.js" integrity="sha384-R7p1RqabZNhI+RdPNIzTouzd/LBVorZ0Tn3ApcogSOk+HF3o+P0HIenrUw/n0MOj" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.min.js" integrity="sha384-CQ4AxjKMbwkpRAbM9OieSp9qUK/cnkDorVLUIayOFJXw/GJHmxbmu1eG0ZeSQ55u" crossorigin="anonymous"></script> -
Hello, world! Open the page in your browser of choice to see your Bootstrapped page. Now you can start building with Bootstrap by creating your own layout, adding dozens of components, and utilizing our official examples.