CHAPTER 10
Beginner
Bootstrap Cards
Updated: May 18, 2026
5 min read
# CHAPTER 10
Bootstrap Cards
1. Chapter Introduction
The Bootstrap Card is the most versatile and widely used component. Products, blog posts, user profiles, pricing plans, dashboard stats — almost every UI element that shows contained content in a box uses a card. Mastering cards means mastering 30% of all Bootstrap UIs.2. Learning Objectives
- Build basic cards with headers, bodies, and footers.
- Add images to cards (top, bottom, overlays).
- Create card groups and grids.
- Build horizontal cards.
- Build a product listing with cards.
3. Basic Card Structure
html
4. Card with Image
html
5. Card with Header and Footer
html
6. Horizontal Cards
html
7. Card Utilities (Color Variants)
html
8. Mini Project: Product Cards Layout
html
9. Common Mistakes
-
Not using
h-100in grid card layouts: Withouth-100, cards in a grid row won't be equal height. Always addh-100to cards inside grid columns.
-
card-img-topwithoutobject-fit: Images of different aspect ratios will distort. Addstyle="object-fit:cover"or a fixed height.
10. MCQs
Question 1
What class is the direct parent of card content?
Question 2
Image on top of a card?
Question 3
Equal height cards in a row?
Question 4
Text displayed over a card image?
Question 5
Horizontal card uses?
Question 6
Card footer class?
Question 7
Primary colored card?
Question 8
g-0 on .row inside a card does?
Question 9
Card subtitle class?
Question 10
.card-link creates?
11. Interview Questions
- Q: How do you make all cards in a Bootstrap grid row equal height?
-
Q: Explain the difference between
card-img-topandcard-img-overlay.
12. Summary
Bootstrap Cards are the most versatile layout component. They handle product listings, blog previews, user profiles, stat panels, and pricing displays. The key techniques are:h-100 for equal heights, card-img-top for media, card-img-overlay for text-over-image, and horizontal cards using the grid inside a card.