Bootstrap Card Examples on CodePen

Bootstrap, a popular CSS framework, offers a wide range of pre-designed components to simplify and speed up web development. Among these, Bootstrap cards are versatile and widely used for displaying content in a clean, consistent manner. If you're looking for inspiration or need help getting started, CodePen, an online code editor and community, is an excellent resource. Here, we'll explore some Bootstrap card examples and guide you through implementing them using CodePen.

100+ Best jQuery Cards Examples on CodePen
100+ Best jQuery Cards Examples on CodePen

Before we dive into the examples, ensure you have a basic understanding of HTML, CSS, and Bootstrap. Familiarize yourself with the Bootstrap documentation to make the most of these examples.

Bootstrap Photo Gallery
Bootstrap Photo Gallery

Basic Bootstrap Card Example

The basic Bootstrap card consists of a card header, body, and footer. Let's create a simple card using CodePen.

Bootstrap card design with hover effect
Bootstrap card design with hover effect

1. First, include the Bootstrap CDN in your CodePen HTML panel: <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet">

Creating a Single Card

10+ Bootstrap profiles (latest collection)
10+ Bootstrap profiles (latest collection)

2. Now, add the following code to the HTML panel:

<div class="card" style="width: 18rem;">
  <img src="..." class="card-img-top" alt="...">
  <div class="card-body">
    <h5 class="card-title">Card Title</h5>
    <p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
    <a href="#" class="btn btn-primary">Go somewhere</a>
  </div>
</div>

3. Replace the src attribute in the <img> tag with the path to your desired image.

Creating Multiple Cards in a Row

an image of a web page with many different types of buttons and numbers on it
an image of a web page with many different types of buttons and numbers on it

4. To create multiple cards in a row, wrap them in a container and use the Bootstrap grid system:

<div class="container">
  <div class="row">
    <div class="col-md-4">
      <!-- Your first card here -->
    </div>
    <div class="col-md-4">
      <!-- Your second card here -->
    </div>
    <div class="col-md-4">
      <!-- Your third card here -->
    </div>
  </div>
</div>

Advanced Bootstrap Card Examples

CodePen is filled with advanced Bootstrap card examples. Let's explore a few and guide you through implementing them.

Cards UI Design
Cards UI Design

Cards with Interactive Elements

5. You can add interactivity to your cards using Bootstrap's collapse and accordion components. Here's a simple example:

Bootstrap 4 Classes List Cheat Sheet
Bootstrap 4 Classes List Cheat Sheet
CSS Cards
CSS Cards
Create Responsive Material Card Design with jQuery Plugin
Create Responsive Material Card Design with jQuery Plugin
Bootstrap 4 Masonry Layout
Bootstrap 4 Masonry Layout
Bootstrap Expand Cards Animation With CSS | Bootstrap Collapsible Card
Bootstrap Expand Cards Animation With CSS | Bootstrap Collapsible Card
12+ Cool CSS Movie Card Examples - OnAirCode
12+ Cool CSS Movie Card Examples - OnAirCode
Bootstrap 4 responsive card design example
Bootstrap 4 responsive card design example
an image of a business card with the words david jones web development in front of it
an image of a business card with the words david jones web development in front of it
Bootstrap 5.3 (2025) Cheat Sheet
Bootstrap 5.3 (2025) Cheat Sheet
[CSS]レスポンシブ対応の賢いアイデア、自在に伸び縮みするカード型レイアウトを実装するスタイルシート -chewing grid
[CSS]レスポンシブ対応の賢いアイデア、自在に伸び縮みするカード型レイアウトを実装するスタイルシート -chewing grid
the book cover for bootstrap reference guide 4 by jacob lett
the book cover for bootstrap reference guide 4 by jacob lett
Responsive CSS Cards Design with Hover Animation in HTML & CSS
Responsive CSS Cards Design with Hover Animation in HTML & CSS
11 CSS Blog Cards
11 CSS Blog Cards
the picked pins page on the webpage is filled with images and text, which are
the picked pins page on the webpage is filled with images and text, which are
#CSS Animations Tips and Tricks
#CSS Animations Tips and Tricks
20+ Cool Product Card CSS Design Examples - OnAirCode
20+ Cool Product Card CSS Design Examples - OnAirCode
Codepen Team Member List - Even/Odd Styles
Codepen Team Member List - Even/Odd Styles
14 CSS Card Hover Effects Examples - OnAirCode
14 CSS Card Hover Effects Examples - OnAirCode
Css
Css
CSS Blog Cards
CSS Blog Cards

<div class="card">
  <div class="card-header">
    <a class="collapsed" data-bs-toggle="collapse" href="#collapseExample">
      Collapse example
      <i class="fas fa-plus"></i>
    </a>
  </div>
  <div id="collapseExample" class="collapse">
    <div class="card-body">
      This is some text within a card body.
    </div>
  </div>
</div>

Cards with Custom Styling

6. To create cards with custom styling, you can use Bootstrap's utility classes or custom CSS. Here's an example using utility classes:

<div class="card bg-dark text-white" style="width: 18rem;">
  <img src="..." class="card-img-top" alt="...">
  <div class="card-img-overlay">
    <h5 class="card-title">Card Title</h5>
    <p class="card-text">Some quick example text.</p>
    <p class="card-text"><small>Last updated 3 mins ago</small></p>
  </div>
</div>

CodePen is an invaluable resource for learning and experimenting with Bootstrap cards. By exploring and implementing these examples, you'll gain a solid understanding of Bootstrap's card component and be well on your way to creating engaging and responsive web pages.

Happy coding, and don't forget to share your creations with the CodePen community!