Bootstrap 5 Quick Start Guide

Install bootstrap and create a website for 10 minutes

·

1 min read

First, we need to create a folder for a new Bootstrap project, open it In VS Code, press "ctr+m" to open the command line and write "npm -v" to check whether npm is installed. If so, move to the second step.

Now we need to create a package.json with the command "npm init" in cli. It will ask you a few questions, just skip them by pressing enter. You can fill them later if you want.

Type "npm i bootstrap" in the cli to install Bootstrap from npm.

Install Bootstrap icons - "npm i bootstrap-icons".

Install FontAwesome snippets extension for VS Code.

Create index.html in the main folder.

Add basic HTML markup via the "!" Emmet abbreviation in your HTML file. Then copy the link in the <head> and the script in the <body>.

<link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.css">

<script src="node_modules/bootstrap/dist/js/bootstrap.bundle.js"></script>

Write "!BlogTemplate" in HTML to make your first Bootstrap website.

Open your project in a browser through the Live Server extension for VS Code.

Congratulations, you are done, and it's time to take a good Bootstrap 5 course. I recommend you to do it on the FreeCodeCamp YouTube channel.