Course Content
Bootstrap 5 Grid
In Bootstrap 5, the grid system is a powerful and flexible feature that allows you to create responsive layouts for your web pages. The grid system is based on a 12-column layout, which helps you organize and align content effectively.
0/9
Bootstrap 5 Other
Bootstrap 5 offers many other features and components in addition to the ones mentioned earlier
0/4
Bootstrap 5 – A Comprehensive Guide to Modern Web Development
About Lesson

In Bootstrap 5, cards are a versatile and flexible component used to display various types of content. They provide a container for organizing and presenting information in a visually appealing manner. Here’s how you can create cards in Bootstrap 5:

  1. Basic Card:
<div class="card">
  <div class="card-body">
    This is a basic card.
  </div>
</div>
  1. Card with Header and Footer:
<div class="card">
  <div class="card-header">
    Card Header
  </div>
  <div class="card-body">
    This is a card with a header and footer.
  </div>
  <div class="card-footer">
    Card Footer
  </div>
</div>
  1. Card with Image:
<div class="card">
  <img src="image.jpg" class="card-img-top" alt="Image">
  <div class="card-body">
    <h5 class="card-title">Card Title</h5>
    <p class="card-text">Some text here.</p>
  </div>
</div>
  1. Card with List Group:
<div class="card">
  <div class="card-body">
    <h5 class="card-title">Card Title</h5>
    <p class="card-text">Some text here.</p>
    <ul class="list-group list-group-flush">
      <li class="list-group-item">Item 1</li>
      <li class="list-group-item">Item 2</li>
      <li class="list-group-item">Item 3</li>
    </ul>
  </div>
</div>
  1. Card with Button:
<div class="card">
  <div class="card-body">
    <h5 class="card-title">Card Title</h5>
    <p class="card-text">Some text here.</p>
    <a href="#" class="btn btn-primary">Read More</a>
  </div>
</div>

You can customize the appearance of cards by combining different classes and adding various elements, such as headers, footers, images, buttons, and list groups. Additionally, you can apply different card styles using classes like card-primary, card-success, card-warning, card-danger, and more.

Feel free to use cards to showcase your content in an organized and visually appealing way. For more details and additional options related to cards in Bootstrap 5, refer to the official Bootstrap documentation.

Join the conversation