Bootstrap's cards provide a flexible and extensible content container with multiple variants and options.
Example
Below is an example of a basic card with mixed content and a fixed width. Cards have no fixed width to start, so they’ll naturally fill the full width of its parent element. This is easily customized with our various sizing options.
That’s my skill. I’m not really specifically talented at anything except for the ability to learn.
Body
The building block of a card is the .card-body. Use it whenever you need a padded section within a card.
This is some text within a card body.
<divclass="card"><divclass="card-body">
This is some text within a card body.
</div></div>
Titles, text, and links
Card titles are used by adding .card-title to a <h*> tag. In the same way, links are added and placed next to each other by adding .card-link to an <a> tag.
Subtitles are used by adding a .card-subtitle to a <h*> tag. If the .card-title and the .card-subtitle items are placed in a .card-body item, the card title and subtitle are aligned nicely.
Card title
Card subtitle
Some quick example text to build on the card title and make up the bulk of the card's content.
<divclass="card"style="width: 20rem;"><divclass="card-body"><h4class="card-title">Card title</h4><h6class="card-subtitle mb-2 text-muted">Card subtitle</h6><pclass="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p><ahref="javascript:;"class="card-link">Card link</a><ahref="javascript:;"class="card-link">Another link</a></div></div>
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.
Some quick example text to build on the card title and make up the bulk of the card's content.
<divclass="card"style="width: 20rem;"><imgclass="card-img-top"src="..."alt="Card image cap"><divclass="card-body"><pclass="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p></div></div>
List groups
Create lists of content in a card with a flush list group.
Cras justo odio
Dapibus ac facilisis in
Vestibulum at eros
<divclass="card"style="width: 20rem;"><ulclass="list-group list-group-flush"><liclass="list-group-item">Cras justo odio</li><liclass="list-group-item">Dapibus ac facilisis in</li><liclass="list-group-item">Vestibulum at eros</li></ul></div>
Featured
Cras justo odio
Dapibus ac facilisis in
Vestibulum at eros
<divclass="card card-nav-tabs"style="width: 20rem;"><divclass="card-header card-header-danger">
Featured
</div><ulclass="list-group list-group-flush"><liclass="list-group-item">Cras justo odio</li><liclass="list-group-item">Dapibus ac facilisis in</li><liclass="list-group-item">Vestibulum at eros</li></ul></div>
Header and footer
Add an optional header and/or footer within a card.
Featured
Special title treatment
With supporting text below as a natural lead-in to additional content.
<divclass="card card-nav-tabs"><divclass="card-header card-header-warning">
Featured
</div><divclass="card-body"><h4class="card-title">Special title treatment</h4><pclass="card-text">With supporting text below as a natural lead-in to additional content.</p><ahref="javascript:;"class="btn btn-primary">Go somewhere</a></div></div>
Card headers can be styled by adding .card-header to <h*> elements.
Featured
Special title treatment
With supporting text below as a natural lead-in to additional content.
<divclass="card card-nav-tabs"><h4class="card-header card-header-info">Featured</h4><divclass="card-body"><h4class="card-title">Special title treatment</h4><pclass="card-text">With supporting text below as a natural lead-in to additional content.</p><ahref="javascript:;"class="btn btn-primary">Go somewhere</a></div></div>
Quote
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
<divclass="card card-nav-tabs"><divclass="card-header card-header-success">
Quote
</div><divclass="card-body"><blockquoteclass="blockquote mb-0"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p><footerclass="blockquote-footer">Someone famous in <citetitle="Source Title">Source Title</cite></footer></blockquote></div></div>
Featured
Special title treatment
With supporting text below as a natural lead-in to additional content.
<divclass="card card-nav-tabs text-center"><divclass="card-header card-header-primary">
Featured
</div><divclass="card-body"><h4class="card-title">Special title treatment</h4><pclass="card-text">With supporting text below as a natural lead-in to additional content.</p><ahref="javascript:;"class="btn btn-primary">Go somewhere</a></div><divclass="card-footer text-muted">
2 days ago
</div></div>
Text alignment
You can quickly change the text alignment of any card—in its entirety or specific parts—with text align classes.
Special title treatment
With supporting text below as a natural lead-in to additional content.
<divclass="card"style="width: 20rem;"><divclass="card-body"><h4class="card-title">Special title treatment</h4><pclass="card-text">With supporting text below as a natural lead-in to additional content.</p><ahref="javascript:;"class="btn btn-primary">Go somewhere</a></div></div><divclass="card text-center"style="width: 20rem;"><divclass="card-body"><h4class="card-title">Special title treatment</h4><pclass="card-text">With supporting text below as a natural lead-in to additional content.</p><ahref="javascript:;"class="btn btn-primary">Go somewhere</a></div></div><divclass="card text-right"style="width: 20rem;"><divclass="card-body"><h4class="card-title">Special title treatment</h4><pclass="card-text">With supporting text below as a natural lead-in to additional content.</p><ahref="javascript:;"class="btn btn-primary">Go somewhere</a></div></div>
Navigation
Add some navigation to a card’s header (or block) with Bootstrap’s nav components.
<divclass="card text-center"><divclass="card-header card-header-rose"><ulclass="nav nav-tabs"><liclass="nav-item"><aclass="nav-link active"href="javascript:;">Active</a></li><liclass="nav-item"><aclass="nav-link"href="javascript:;">Link</a></li><liclass="nav-item"><aclass="nav-link disabled"href="javascript:;">Disabled</a></li></ul></div><divclass="card-body"><h4class="card-title">Special title treatment</h4><pclass="card-text">With supporting text below as a natural lead-in to additional content.</p><ahref="javascript:;"class="btn btn-primary">Go somewhere</a></div></div>
<divclass="card text-center"><divclass="card-header"><ulclass="nav nav-pills card-header-pills"><liclass="nav-item"><aclass="nav-link active"href="javascript:;">Active</a></li><liclass="nav-item"><aclass="nav-link"href="javascript:;">Link</a></li><liclass="nav-item"><aclass="nav-link disabled"href="javascript:;">Disabled</a></li></ul></div><divclass="card-body"><h4class="card-title">Special title treatment</h4><pclass="card-text">With supporting text below as a natural lead-in to additional content.</p><ahref="javascript:;"class="btn btn-primary">Go somewhere</a></div></div>
Images
Cards include a few options for working with images. Choose from appending “image caps” at either end of a card, overlaying images with card content, or simply embedding the image in a card.
Image caps
Similar to headers and footers, cards can include top and bottom “image caps”—images at the top or bottom of a card.
Card title
This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
Last updated 3 mins ago
Card title
This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
Last updated 3 mins ago
<divclass="card mb-3"><imgclass="card-img-top"src="..."alt="Card image cap"><divclass="card-body"><h4class="card-title">Card title</h4><pclass="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p><pclass="card-text"><smallclass="text-muted">Last updated 3 mins ago</small></p></div></div><divclass="card"><divclass="card-body"><h4class="card-title">Card title</h4><pclass="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p><pclass="card-text"><smallclass="text-muted">Last updated 3 mins ago</small></p></div><imgclass="card-img-bottom"src="..."alt="Card image cap"></div>
Image overlays
Turn an image into a card background and overlay your card’s text. Depending on the image, you may or may not need additional styles or utilities.
Card title
This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
Last updated 3 mins ago
<divclass="card bg-dark text-white"><imgclass="card-img"src="..."alt="Card image"><divclass="card-img-overlay"><h4class="card-title">Card title</h4><pclass="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p><pclass="card-text">Last updated 3 mins ago</p></div></div>