Skip to content

Latest commit

 

History

History
53 lines (39 loc) · 2.06 KB

File metadata and controls

53 lines (39 loc) · 2.06 KB

Bootstrap

Introduction

Bootstrap is a powerful front-end framework for faster and easier web development. It includes HTML, CSS, and JavaScript components for creating responsive and mobile-first websites.

Installation

Using CDN

To quickly add Bootstrap to your project, you can use the Content Delivery Network (CDN) links. Add the following lines to the <head> section of your HTML file:

<!-- Bootstrap CSS -->
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">

<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>

Using npm

If you prefer to use npm, you can install Bootstrap via npm. Run the following command in your project directory:

npm install bootstrap

Then, you can import Bootstrap in your JavaScript file:

import 'bootstrap/dist/css/bootstrap.min.css';
import 'bootstrap/dist/js/bootstrap.bundle.min';

Using Downloaded Files

You can also download the Bootstrap files and include them in your project. Download the latest version from Bootstrap's official website. Extract the files and include the CSS and JS files in your HTML:

<!-- Bootstrap CSS -->
<link href="path/to/bootstrap.min.css" rel="stylesheet">

<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="path/to/jquery.slim.min.js"></script>
<script src="path/to/popper.min.js"></script>
<script src="path/to/bootstrap.min.js"></script>

Conclusion

You have successfully installed Bootstrap in your project. You can now use its components and utilities to build responsive and modern web pages.

For more information, visit the Bootstrap documentation.