A card in bordered box with some padding around its content. It includes options for headers, footers, content, colors.
Sample Code
<!doctype html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1"><linkhref="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"rel="stylesheet"><linkhref="https://getbootstrap.com/docs/5.2/assets/css/docs.css"rel="stylesheet"><title>Bootstrap Example</title><scriptsrc="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script></head><bodyclass="p-3 m-0 border-0 bd-example"><divclass="card"style="width: 18rem;"><svgclass="bd-placeholder-img card-img-top"width="100%"height="180"xmlns="http://www.w3.org/2000/svg"role="img"aria-label="Placeholder: Image cap"preserveAspectRatio="xMidYMid slice"focusable="false"><title>Placeholder</title><rectwidth="100%"height="100%"fill="#868e96"></rect><textx="50%"y="50%"fill="#dee2e6"dy=".3em">Image cap</text></svg><divclass="card-body"><h5class="card-title">Title</h5><pclass="card-text">example consider “www.wikitechy.com” is a website.</p><ahref="#"class="btn btn-primary">Go</a></div></div></body></html>
Output
Bootstrap Card Title, 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.
Sample Code
<!doctype html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1"><linkhref="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"rel="stylesheet"><linkhref="https://getbootstrap.com/docs/5.2/assets/css/docs.css"rel="stylesheet"><title>Bootstrap Example</title><scriptsrc="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script></head><bodyclass="p-3 m-0 border-0 bd-example"><divclass="card"style="width: 18rem;"><divclass="card-body"><h5class="card-title">Title</h5><h6class="card-subtitle mb-2 text-muted">Subtitle</h6><pclass="card-text">The example consider “www.wikitechy.com” is a website.</p><ahref="#"class="card-link">Link</a></div></div></body></html><bodyclass="p-3 m-0 border-0 bd-example"><divclass="card"style="width: 18rem;"><svgclass="bd-placeholder-img card-img-top"width="100%"height="180"xmlns="http://www.w3.org/2000/svg"role="img"aria-label="Placeholder: Image cap"preserveAspectRatio="xMidYMid slice"focusable="false"><title>Placeholder</title><rectwidth="100%"height="100%"fill="#868e96"></rect><textx="50%"y="50%"fill="#dee2e6"dy=".3em">Image cap</text></svg><divclass="card-body"><h5class="card-title">Title</h5><pclass="card-text">example consider “www.wikitechy.com” is a website.</p><ahref="#"class="btn btn-primary">Go</a></div></div></body></html>
Output
Bootstrap Card Images
.card-img-top places an image to the top of the card.
With .card-text, text can be added to the card.
Text within .card-text can also be styled with the standard HTML tags.
Sample Code
<!doctype html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1"><linkhref="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"rel="stylesheet"><linkhref="https://getbootstrap.com/docs/5.2/assets/css/docs.css"rel="stylesheet"><title>Bootstrap Example</title><scriptsrc="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script></head><bodyclass="p-3 m-0 border-0 bd-example"><divclass="card"style="width: 18rem;"><svgclass="bd-placeholder-img card-img-top"width="100%"height="180"xmlns="http://www.w3.org/2000/svg"role="img"aria-label="Placeholder: Image cap"preserveAspectRatio="xMidYMid slice"focusable="false"><title>Placeholder</title><rectwidth="100%"height="100%"fill="#868e96"></rect><textx="50%"y="50%"fill="#dee2e6"dy=".3em">Image cap</text></svg><divclass="card-body"><pclass="card-text">The example consider “www.wikitechy.com” is a website.</p></div></div></body></html>
Output
Bootstrap Card List Groups Example 1
In Bootstrap, a card list group is a list of related items displayed in a card-like format. This is achieved by combining the card component with the list-group component.
Image styles, blocks, text styles, and a list group—all wrapped in a fixed-width card.
Sample Code
<!doctype html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1"><linkhref="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"rel="stylesheet"><linkhref="https://getbootstrap.com/docs/5.2/assets/css/docs.css"rel="stylesheet"><title>Bootstrap Example</title><scriptsrc="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script></head><bodyclass="p-3 m-0 border-0 bd-example"><divclass="card"style="width: 18rem;"><svgclass="bd-placeholder-img card-img-top"width="100%"height="180"xmlns="http://www.w3.org/2000/svg"role="img"aria-label="Placeholder: Image cap"preserveAspectRatio="xMidYMid slice"focusable="false"><title>Placeholder</title><rectwidth="100%"height="100%"fill="#868e96"></rect><textx="50%"y="50%"fill="#dee2e6"dy=".3em">Image cap</text></svg><divclass="card-body"><h5class="card-title">Title</h5><pclass="card-text">The example consider “www.wikitechy.com” is a website.</p></div><ulclass="list-group list-group-flush"><liclass="list-group-item">KaashivInfotech</li><liclass="list-group-item">wikitechy</li><liclass="list-group-item">Kaashiv</li></ul><divclass="card-body"><ahref="#"class="card-link">Link</a></div></div></body></html>
Output
Bootstrap Header and Footer Example 1
The .card-header class adds a heading to the card and the .card-footer class adds a footer to the card
Sample Code
<!doctype html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1"><linkhref="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"rel="stylesheet"><linkhref="https://getbootstrap.com/docs/5.2/assets/css/docs.css"rel="stylesheet"><title>Bootstrap Example</title><scriptsrc="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script></head><bodyclass="p-3 m-0 border-0 bd-example"><divclass="card"><divclass="card-header">
Featured
</div><divclass="card-body"><h5class="card-title">Title</h5><pclass="card-text">The example consider “www.wikitechy.com” is a website.</p><ahref="#"class="btn btn-primary">Link</a></div></div></body></html>
Output
Bootstrap Header and Footer Example 2
Sample Code
<!doctype html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1"><linkhref="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"rel="stylesheet"><linkhref="https://getbootstrap.com/docs/5.2/assets/css/docs.css"rel="stylesheet"><title>Bootstrap Example</title><scriptsrc="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script></head><bodyclass="p-3 m-0 border-0 bd-example"><divclass="card"><h5class="card-header">Featured</h5><divclass="card-body"><h5class="card-title">Title</h5><pclass="card-text">The example consider “www.wikitechy.com” is a website.</p><ahref="#"class="btn btn-primary">Link</a></div></div></body></html>
Output
Bootstrap Header and Footer Example 3
Sample Code
<!doctype html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1"><linkhref="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"rel="stylesheet"><linkhref="https://getbootstrap.com/docs/5.2/assets/css/docs.css"rel="stylesheet"><title>Bootstrap Example</title><scriptsrc="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script></head><bodyclass="p-3 m-0 border-0 bd-example"><divclass="card"><divclass="card-header">
Quote
</div><divclass="card-body"><blockquoteclass="blockquote mb-0"><p>A well-known quote, contained in a blockquote element.</p><footerclass="blockquote-footer">Someone famous in <citetitle="Source Title">Source Title</cite></footer></blockquote></div></div></body></html>
Output
Bootstrap Header and Footer Example 4
Sample Code
<!doctype html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1"><linkhref="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"rel="stylesheet"><linkhref="https://getbootstrap.com/docs/5.2/assets/css/docs.css"rel="stylesheet"><title>Bootstrap Example</title><scriptsrc="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script></head><bodyclass="p-3 m-0 border-0 bd-example"><divclass="card text-center"><divclass="card-header">
Featured
</div><divclass="card-body"><h5class="card-title">Title</h5><pclass="card-text">The example consider “www.wikitechy.com” is a website.</p><ahref="#"class="btn btn-primary">Link</a></div><divclass="card-footer text-muted">
3 days ago
</div></div></body></html>
Output
Bootstrap Card Navigation
Bootstrap Card Navigation is a user interface design pattern in which a set of cards are used as navigation items to switch between different content sections or pages.
Sample Code
<!doctype html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1"><linkhref="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"rel="stylesheet"><linkhref="https://getbootstrap.com/docs/5.2/assets/css/docs.css"rel="stylesheet"><title>Bootstrap Example</title><scriptsrc="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script></head><bodyclass="p-3 m-0 border-0 bd-example"><divclass="card text-center"><divclass="card-header"><ulclass="nav nav-tabs card-header-tabs"><liclass="nav-item"><aclass="nav-link active"aria-current="true"href="#">Active</a></li><liclass="nav-item"><aclass="nav-link"href="#">Link</a></li><liclass="nav-item"><aclass="nav-link disabled">Disabled</a></li></ul></div><divclass="card-body"><h5class="card-title">Title</h5><pclass="card-text">The example consider “www.wikitechy.com” is a website.</p><ahref="#"class="btn btn-primary">Somewhere</a></div></div></body></html>
Output
Bootstrap Card Image Cap
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.
We have added the image outside of the .card-body to span the entire width:
Sample Code
<!doctype html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1"><linkhref="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"rel="stylesheet"><linkhref="https://getbootstrap.com/docs/5.2/assets/css/docs.css"rel="stylesheet"><title>Bootstrap Example</title><scriptsrc="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script></head><bodyclass="p-3 m-0 border-0 bd-example"><divclass="card mb-3"><svgclass="bd-placeholder-img card-img-top"width="100%"height="180"xmlns="http://www.w3.org/2000/svg"role="img"aria-label="Placeholder: Image cap"preserveAspectRatio="xMidYMid slice"focusable="false"><title>Placeholder</title><rectwidth="100%"height="100%"fill="#868e96"></rect><textx="50%"y="50%"fill="#dee2e6"dy=".3em">Image cap</text></svg><divclass="card-body"><h5class="card-title">KaashivInfotech</h5><pclass="card-text">The example consider “www.wikitechy.com” is a website.</p><pclass="card-text"><smallclass="text-muted">Last updated 5 mins ago</small></p></div></div><divclass="card"><divclass="card-body"><h5class="card-title">KaashivInfotech</h5><pclass="card-text">The example consider “www.wikitechy.com” is a website.</p><pclass="card-text"><smallclass="text-muted">Last updated 5 mins ago</small></p></div><svgclass="bd-placeholder-img card-img-bottom"width="100%"height="180"xmlns="http://www.w3.org/2000/svg"role="img"aria-label="Placeholder: Image cap"preserveAspectRatio="xMidYMid slice"focusable="false"><title>Placeholder</title><rectwidth="100%"height="100%"fill="#868e96"></rect><textx="50%"y="50%"fill="#dee2e6"dy=".3em">Image cap</text></svg></div></body></html>
Output
Bootstrap Card Image overlay
Turn an image into a card background and use .card-img-overlay to add text on top of the image.
Sample Code
<!doctype html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1"><linkhref="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"rel="stylesheet"><linkhref="https://getbootstrap.com/docs/5.2/assets/css/docs.css"rel="stylesheet"><title>Bootstrap Example</title><scriptsrc="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script></head><bodyclass="p-3 m-0 border-0 bd-example"><divclass="card text-bg-dark"><svgclass="bd-placeholder-img bd-placeholder-img-lg card-img"width="100%"height="270"xmlns="http://www.w3.org/2000/svg"role="img"aria-label="Placeholder: Card image"preserveAspectRatio="xMidYMid slice"focusable="false"><title>Placeholder</title><rectwidth="100%"height="100%"fill="#868e96"></rect><textx="50%"y="50%"fill="#dee2e6"dy=".3em">Card image</text></svg><divclass="card-img-overlay"><h5class="card-title">Title</h5><pclass="card-text">The example consider “www.wikitechy.com” is a website.</p><pclass="card-text"><small>Last updated 5 mins ago</small></p></div></div></body></html>
Output
Bootstrap Card Background Color
You can use the bg-* classes in Bootstrap to set the background color of a card. For example, bg-primary sets the background color to the primary color defined in the Bootstrap theme, while bg-dark sets the background color to a dark shade. You can also set a custom background color by using the bg-* classes along with a color name or a HEX code.
You can use the border-* classes in Bootstrap to set the border of a card. For example, border-primary sets the border color to the primary color defined in the Bootstrap theme, while border-dark sets the border color to a dark shade. You can also set the border width by using the border-* classes along with a width value such as border-1, border-2, etc.
Bootstrap Card Group is a component in the Bootstrap framework that allows you to group multiple cards together into a single, cohesive unit.
Sample Code
<!doctype html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1"><linkhref="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"rel="stylesheet"><linkhref="https://getbootstrap.com/docs/5.2/assets/css/docs.css"rel="stylesheet"><title>Bootstrap Example</title><scriptsrc="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script></head><bodyclass="p-3 m-0 border-0 bd-example"><divclass="card-group"><divclass="card"><svgclass="bd-placeholder-img card-img-top"width="100%"height="180"xmlns="http://www.w3.org/2000/svg"role="img"aria-label="Placeholder: Image cap"preserveAspectRatio="xMidYMid slice"focusable="false"><title>Placeholder</title><rectwidth="100%"height="100%"fill="#868e96"></rect><textx="50%"y="50%"fill="#dee2e6"dy=".3em">Image cap</text></svg><divclass="card-body"><h5class="card-title">Card title</h5><pclass="card-text">The example consider “www.wikitechy.com” is a website.</p></div><divclass="card-footer"><smallclass="text-muted">Last updated 5 mins ago</small></div></div><divclass="card"><svgclass="bd-placeholder-img card-img-top"width="100%"height="180"xmlns="http://www.w3.org/2000/svg"role="img"aria-label="Placeholder: Image cap"preserveAspectRatio="xMidYMid slice"focusable="false"><title>Placeholder</title><rectwidth="100%"height="100%"fill="#868e96"></rect><textx="50%"y="50%"fill="#dee2e6"dy=".3em">Image cap</text></svg><divclass="card-body"><h5class="card-title">Card title</h5><pclass="card-text">The example consider “www.wikitechy.com” is a website.</p></div><divclass="card-footer"><smallclass="text-muted">Last updated 5 mins ago</small></div></div><divclass="card"><svgclass="bd-placeholder-img card-img-top"width="100%"height="180"xmlns="http://www.w3.org/2000/svg"role="img"aria-label="Placeholder: Image cap"preserveAspectRatio="xMidYMid slice"focusable="false"><title>Placeholder</title><rectwidth="100%"height="100%"fill="#868e96"></rect><textx="50%"y="50%"fill="#dee2e6"dy=".3em">Image cap</text></svg><divclass="card-body"><h5class="card-title">Card title</h5><pclass="card-text">The example consider “www.wikitechy.com” is a website.</p></div><divclass="card-footer"><smallclass="text-muted">Last updated 5 mins ago</small></div></div></div></body></html>
Related Searches to Bootstrap Cards - How to Use Bootstrap 5 Cards
bootstrap cards template bootstrap cards bootstrap cards side by side bootstrap cards side by side responsive react bootstrap cards bootstrap 4 cards bootstrap card design bootstrap cards in a row bootstrap cards bootstrap cards same height bootstrap cards responsive bootstrap cards react how to add space between bootstrap cards responsive bootstrap cards bootstrap 5 cards