Simple Bootstrap Website Example

Ruth Jul 09, 2026

Bootstrap, a popular open-source CSS framework, has revolutionized web development by providing a robust set of tools for creating responsive and mobile-first websites. If you're new to Bootstrap or looking to build a simple website, this guide will walk you through creating a basic Bootstrap website example step by step.

20+ Best Bootstrap Website Examples for Inspiration (2024)
20+ Best Bootstrap Website Examples for Inspiration (2024)

Before we dive in, ensure you have the following prerequisites: a basic understanding of HTML, CSS, and JavaScript; a code editor like Visual Studio Code or Sublime Text; and Bootstrap installed on your local machine or access to a CDN.

Website Landing Page using HTML CSS Bootstrap 5 #3 - Coding Yaar
Website Landing Page using HTML CSS Bootstrap 5 #3 - Coding Yaar

Setting Up the Project Structure

The first step in creating any website is setting up the project structure. For this Bootstrap example, we'll create the following folders and files:

40+ Best Free Bootstrap Templates & Themes in 2026 — Speckyboy
40+ Best Free Bootstrap Templates & Themes in 2026 — Speckyboy

  • index.html: The main HTML file where we'll build our website.
  • css/: Folder containing custom CSS styles.
  • js/: Folder containing custom JavaScript files.

Creating the Basic HTML Structure

the landing page for a website that is designed to look like a computer screen
the landing page for a website that is designed to look like a computer screen

Open your code editor and create a new file named index.html. Add the following basic HTML structure to get started:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>My Bootstrap Website</title>
</head>
<body>
  <-- Content will go here -->
</body>
</html>

Incorporating Bootstrap into Your Project

Append - Free Bootstrap Template for Landing Page Websites
Append - Free Bootstrap Template for Landing Page Websites

To use Bootstrap in your project, you can either download the framework and link the CSS and JavaScript files locally or use the Bootstrap CDN. For simplicity, we'll use the CDN in this example. Add the following lines inside the <head> tag:

<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js" integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN" crossorigin="anonymous"></script>

Building the Website Layout

an image of a website page with multiple screens
an image of a website page with multiple screens

Now that we have the basic project structure and Bootstrap incorporated, let's start building the website layout. We'll create a simple layout with a navigation bar, header, and a few sections.

Creating the Navigation Bar

Product Website Landing Page HTML CSS Bootstrap 5
Product Website Landing Page HTML CSS Bootstrap 5
SOFTWARE DEVELOPER PORTFOLIO
SOFTWARE DEVELOPER PORTFOLIO
Free HTML Business Template
Free HTML Business Template
Bootstrap Photo Gallery
Bootstrap Photo Gallery
20 Best Directory Website Templates 2026 - Colorlib
20 Best Directory Website Templates 2026 - Colorlib
Bootstrap 5 Website Layout Design
Bootstrap 5 Website Layout Design
Lexa - Bootstrap 5 Admin & Dashboard Template
Lexa - Bootstrap 5 Admin & Dashboard Template
Borrow - Bootstrap 5 Template for Bank and fintech company
Borrow - Bootstrap 5 Template for Bank and fintech company
Simple Website Design Inspiration: 20 Top Layouts for Your Site in 2024
Simple Website Design Inspiration: 20 Top Layouts for Your Site in 2024
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
How To Make a Website Using HTML And CSS
How To Make a Website Using HTML And CSS
Website Design Icons, Website Menu Icon, Simplistic Website, Coolest Website, Website Design Inspiration Blog, Websites Design Ideas, Login Page Design Website Layout Ideas, Canva Website Ideas, Layout Website Design
Website Design Icons, Website Menu Icon, Simplistic Website, Coolest Website, Website Design Inspiration Blog, Websites Design Ideas, Login Page Design Website Layout Ideas, Canva Website Ideas, Layout Website Design
"Framer Business Site: Responsive, Ready-Made Template"
"Framer Business Site: Responsive, Ready-Made Template"
Portfolio Website UI | Frontend Developer
Portfolio Website UI | Frontend Developer
200+ Best Bootstrap Website Templates 2026 - Colorlib
200+ Best Bootstrap Website Templates 2026 - Colorlib
Blon - Personal Portfolio Template
Blon - Personal Portfolio Template
the website design is clean and modern, but it doesn't look like anything else
the website design is clean and modern, but it doesn't look like anything else
the website design is designed to look like it could be used in many different ways
the website design is designed to look like it could be used in many different ways
an image of a website page with the wordpress theme and images displayed on it
an image of a website page with the wordpress theme and images displayed on it
Passion - Lead Generation Landing Page Free Bootstrap Template
Passion - Lead Generation Landing Page Free Bootstrap Template

Replace the <-- Content will go here --> comment in the <body> tag with the following code to create a simple navigation bar using Bootstrap's navbar component:

<nav class="navbar navbar-expand-lg navbar-light bg-light">
  <div class="container">
    <a class="navbar-brand" href="#">Logo</a>
    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarNav">
      <ul class="navbar-nav">
        <li class="nav-item">
          <a class="nav-link active" aria-current="page" href="#">Home</a>
        </li>
        <li class="nav-item">
          <a class="nav-link" href="#">Features</a>
        </li>
        <li class="nav-item">
          <a class="nav-link" href="#">Pricing</a>
        </li>
      </ul>
    </div>
  </div>
</nav>

Adding the Header and Sections

Next, add the following code after the navigation bar to create a header and three sections using Bootstrap's container and jumbotron components:

<div class="container">
  <div class="jumbotron">
    <h1>Welcome to My Bootstrap Website</h1>
    <p>This is a simple website built using Bootstrap.</p>
    <p><a class="btn btn-primary btn-lg" href="#" role="button">Learn more</a></p>
  </div>

  <div class="row">
    <div class="col-md-4">
      <h2>Section 1</h2>
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
    </div>
    <div class="col-md-4">
      <h2>Section 2</h2>
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
    </div>
    <div class="col-md-4">
      <h2>Section 3</h2>
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
    </div>
  </div>
</div>

Styling and Customizing the Website

While Bootstrap provides many pre-built components and styles, you can further customize your website by adding your own CSS styles. Create a new file named style.css inside the css/ folder and link it to your index.html file:

<link rel="stylesheet" href="css/style.css">

Adding Custom CSS Styles

Open the style.css file and add the following custom styles to change the background color, text color, and font family of the website:

body {
  background-color: #f8f9fa;
  color: #333;
  font-family: Arial, sans-serif;
}

.jumbotron {
  background-color: #e9ecef;
  color: #007bff;
}

h1, h2, h3, h4, h5, h6 {
  color: #007bff;
}

Adding Custom JavaScript Functionality

To add custom JavaScript functionality, create a new file named script.js inside the js/ folder and link it to your index.html file:

<script src="js/script.js"></script>

For this simple example, we won't add any custom JavaScript functionality. However, you can use this file to include any custom JavaScript code or libraries you want to use on your website.

And there you have it! You've just created a simple Bootstrap website example. You can further expand this basic layout by adding more sections, components, and custom styles as needed. Happy coding!