Simple Bootstrap Example: Beginner-Friendly Tutorial

Ruth Jul 09, 2026

Bootstrap, a popular CSS framework, is renowned for its simplicity and efficiency in responsive web design. It's a developer's best friend, offering pre-defined classes for typography, forms, buttons, and more. Let's dive into a simple Bootstrap example to understand its power and ease of use.

Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5

Before we begin, ensure you have included the Bootstrap CSS and JavaScript files in your HTML. You can use the official Bootstrap CDN for this purpose.

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

Setting Up a Basic Bootstrap Page

Let's start by creating a simple Bootstrap page structure. We'll use the container and grid system classes to create a responsive layout.

Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5

Here's a basic example:

```html

Content here
Sidebar here
```

Bootstrap Grid System

Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5

The above example uses Bootstrap's grid system. The container class centers the content and adds some padding. The row class creates a new row, and the col classes divide the row into 12 equal parts. Here, 'md' refers to medium devices (tablets, desktops), and the numbers indicate the number of columns to span.

You can create responsive layouts by stacking columns on smaller devices. For instance, the above example will stack the columns on phones, making the sidebar appear below the main content.

Bootstrap Components

Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5

Bootstrap offers a wide range of pre-defined classes for common HTML elements. Let's add some basic components to our page.

Here's an example of a header, paragraph, button, and form using Bootstrap classes:

```html

Welcome to Our Website!

Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5

This is a simple Bootstrap example demonstrating some basic components.

```

Responsive Images and Embedded Media

Website Landing Page using HTML CSS Bootstrap 5 #3 - Coding Yaar
Website Landing Page using HTML CSS Bootstrap 5 #3 - Coding Yaar
Wizard
Wizard
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Photo Gallery
Bootstrap Photo Gallery
eCommerce - Codeigniter Bootstrap Admin Dashboard Template
eCommerce - Codeigniter Bootstrap Admin Dashboard Template
an image of a website page with the wordpress theme and it's logo
an image of a website page with the wordpress theme and it's logo
Free HTML Business Template
Free HTML Business Template
Lexa - Bootstrap 5 Admin & Dashboard Template
Lexa - Bootstrap 5 Admin & Dashboard Template
Bootstrap Responsive Latest Dashboard Premium HTML Simple Admin Panel Template
Bootstrap Responsive Latest Dashboard Premium HTML Simple Admin Panel Template
Layout Web, Cv Website, Layout Portfolio, Design Sites, Webpage Layout, Desain Ux, Cv Inspiration, Plans De Conception Web, Website Design Inspiration Layout
Layout Web, Cv Website, Layout Portfolio, Design Sites, Webpage Layout, Desain Ux, Cv Inspiration, Plans De Conception Web, Website Design Inspiration Layout
Clean Multipurpose Responsive Bootstrap Simple Admin Panel Template
Clean Multipurpose Responsive Bootstrap Simple Admin Panel Template
the landing page for an app that is designed to look like a dashboard
the landing page for an app that is designed to look like a dashboard
Soft Personal Portfolio – Clean HTML/CSS Website 🌸
Soft Personal Portfolio – Clean HTML/CSS Website 🌸
30 Bootstrap Datatable Examples For Web Tables 2026 - uiCookies
30 Bootstrap Datatable Examples For Web Tables 2026 - uiCookies
How to Build a PHP Admin Dashboard With Bootstrap 5
How to Build a PHP Admin Dashboard With Bootstrap 5
Bootstrap 5 Classes List Cheat Sheet
Bootstrap 5 Classes List Cheat Sheet
Passion - Lead Generation Landing Page Free Bootstrap Template
Passion - Lead Generation Landing Page Free Bootstrap Template
50 Best Free Login Forms & Templates 2026
50 Best Free Login Forms & Templates 2026
the dashboard screen shows data, graphs and other things to see in this screenshot
the dashboard screen shows data, graphs and other things to see in this screenshot
Portfolio Website UI | Frontend Developer
Portfolio Website UI | Frontend Developer

Bootstrap also helps in making images and embedded media responsive. It provides classes like 'img-fluid' and 'embed-responsive' for this purpose.

Here's an example of a responsive image and an embedded YouTube video:

```html Responsive image

```

Bootstrap Utilities

Bootstrap also offers utility classes for common styling needs. These classes can be used to quickly change the appearance or behavior of an element.

For example, you can use the 'text-center' class to center text, 'float-right' to float an element to the right, or 'd-none' to hide an element on all screen sizes.

That's it! With just a few lines of code, we've created a simple, responsive, and engaging web page using Bootstrap. Now, it's your turn to explore more of what Bootstrap has to offer and build amazing websites.