How to Create a Simple Web Page Using Bootstrap 5

How to Create a Simple Web Page Using Bootstrap 5

Step-by-step tutorial to launch your first responsive page — no stress, no fluff!

Hey there, fellow web enthusiast!
Ever wondered how professional-looking websites are built so fast these days? Well, you’re about to unlock one of the biggest secrets in modern web developmentBootstrap 5.

Let’s walk through creating a simple and responsive web page using Bootstrap 5. This guide is especially great for beginners, and by the end, you’ll have a neat, functional webpage that looks great on any device!

Fun fact: When I was starting out, I thought you had to write tons of CSS to make things look good. Then I discovered Bootstrap and it was like someone handed me the cheat codes.

What You’ll Need

Before we start, let’s make sure you’ve got everything set:

  • A basic understanding of HTML & CSS
  • A code editor like VS Code
  • A modern browser (Chrome, Firefox, Edge, etc.)
  • A dash of curiosity and creativity!

New to HTML & CSS? Start with the HTML5 & CSS3 Course — it’s beginner-friendly and covers all the essentials.

What Is Bootstrap 5?

Bootstrap 5 is a free, open-source front-end toolkit for developing with HTML, CSS, and JS. It’s built for mobile-first projects and includes ready-to-use components like buttons, navbars, cards, forms, and more.

You’ll save time, write less code, and create responsive layouts with ease.

Let’s Build Your Web Page — Step by Step

1. Set Up the Boilerplate

Here’s a basic HTML structure using Bootstrap 5 via CDN (no need to install anything!).

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>My First Bootstrap Page</title>
  <!-- Bootstrap 5 CSS CDN -->
  <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" />
  <!-- Google Font -->
  <link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet">
  <style>
    body {
      font-family: 'Roboto', sans-serif;
    }
  </style>
</head>
<body>
Code language: HTML, XML (xml)

Now you’re ready to build something cool.

2. Create a Navigation Bar

<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
  <div class="container">
    <a class="navbar-brand" href="#">MySite</a>
    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
      <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarNav">
      <ul class="navbar-nav ms-auto">
        <li class="nav-item"><a class="nav-link active" href="#">Home</a></li>
        <li class="nav-item"><a class="nav-link" href="#">About</a></li>
        <li class="nav-item"><a class="nav-link" href="#">Contact</a></li>
      </ul>
    </div>
  </div>
</nav>
Code language: HTML, XML (xml)

Want to master navbars, grids, modals, and more? Check out the Bootstrap 5 Course — it’s a lifesaver!

3. Add a Hero Section (Banner)

<header class="bg-primary text-white text-center p-5">
    <div class="container">
        <h1>Welcome to My Website</h1>
        <p class="lead">Built with Bootstrap 5 </p>
    </div>
</header>
Code language: HTML, XML (xml)

To spice things up, here’s a beautiful random image you can use:
<img src="https://picsum.photos/1200/400" class="img-fluid" alt="Hero Image">

4. Add Some Content with Cards

<div class="container my-5">
  <div class="row g-4">
    <div class="col-md-4">
      <div class="card">
        <img src="https://picsum.photos/400/200" class="card-img-top" alt="...">
        <div class="card-body">
          <h5 class="card-title">Project One</h5>
          <p class="card-text">This is a simple card with Bootstrap components.</p>
        </div>
      </div>
    </div>
    <!-- Repeat for other cards -->
  </div>
</div>
Code language: JavaScript (javascript)

Pro Tip: Cards are responsive by default in Bootstrap. You don’t need extra CSS!

5. Add a Footer

<footer class="bg-dark text-white text-center py-4">
  <p>&copy; 2025 MySite | Built with using Bootstrap 5</p>
</footer>
Code language: HTML, XML (xml)

And don’t forget to close your HTML:

<!-- Bootstrap JS Bundle -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
Code language: HTML, XML (xml)

Final Touch: Your Complete Code Is Ready!

Once you paste the entire code into your editor and open it in your browser — voilà! You’ve got a sleek, mobile-friendly webpage.

Useful Resources

Here are some additional resources I’ve found super helpful:

Where to Go from Here?

If you enjoyed building this, don’t stop now! To take your skills to the next level, I highly recommend the following courses:

I personally took the Front-End Web Development Course and it completely changed how I build websites.

Let’s Wrap Up!

Building your first web page with Bootstrap 5 is like learning how to ride a bike with training wheels. It gives you balance, structure, and speed — but once you’re comfortable, you can really start exploring your own creative paths!

Feel free to play around with colors, layouts, and components. Don’t be afraid to break things — that’s how real learning happens.

If you enjoyed this tutorial, share it with a friend or fellow learner. Let’s make the web a more beautiful place — one page at a time!

Happy Coding!


Discover more from Prime Inspire

Subscribe to get the latest posts sent to your email.

We’d love to hear your thoughts! Share your ideas below 💡

Scroll to Top

Discover more from Prime Inspire

Subscribe now to keep reading and get access to the full archive.

Continue reading