BootStrap5 Cards

Basic Cards

A basic card is created with the .card class, and content inside the card has a .card-body class.

Basic Card

Header and Footer

The .card-header class adds a heading to the card and the .card-footer class adds a footer to the card.

Header
Body

Contextual Cards

To add a background color the card, use contextual classes (.bg-primary, .bg-success, .bg-info, .bg-warning, .bg-danger, .bg-secondary, .bg-dark and .bg-light.

Basic Card

Primary Card

Secondary Card

Success Card

Warning Card

Danger Card

Info Card

Dark Card

Titles, text, and links

Use .card-title to add card titles to any heading element. The .card-text class is used to remove bottom margins for a p> element if it is the last child (or the only one) inside .card-body. The .card-link class adds a blue color to any link, and a hover effect.

Hadi Raza Card title

A passionate frontend developer from Karachi, PAKISTAN. A passionate frontend developer from Karachi, PAKISTAN.

Card link Another link

Card Images

Add .card-img-top or .card-img-bottom to an img> to place the image at the top or at the bottom inside the card. Note that we have added the image outside of the .card-body to span the entire width.

Card image

Hadi Raza

A passionate frontend developer from Karachi, PAKISTAN.

See Profile

Hadi Raza

A passionate frontend developer from Karachi, PAKISTAN.

See Profile
Card image
Card image

Hadi Raza

A passionate frontend developer from Karachi, PAKISTAN.

See Profile