Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Bootstrap 4 Card Styles</title> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css"> <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.bundle.min.js"></script> <style> .bs-example{ margin: 20px; } </style> </head> <body> <div class="bs-example"> <div class="card text-white bg-primary mb-3" style="width: 20rem;"> <div class="card-body"> <h5 class="card-title">Primary card title</h5> <p class="card-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu sem tempor, varius quam at.</p> </div> </div> <div class="card text-white bg-secondary mb-3" style="width: 20rem;"> <div class="card-body"> <h5 class="card-title">Secondary card title</h5> <p class="card-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu sem tempor, varius quam at.</p> </div> </div> <div class="card text-white bg-success mb-3" style="width: 20rem;"> <div class="card-body"> <h5 class="card-title">Success card title</h5> <p class="card-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu sem tempor, varius quam at.</p> </div> </div> <div class="card text-white bg-danger mb-3" style="width: 20rem;"> <div class="card-body"> <h5 class="card-title">Danger card title</h5> <p class="card-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu sem tempor, varius quam at.</p> </div> </div> <div class="card text-white bg-warning mb-3" style="width: 20rem;"> <div class="card-body"> <h5 class="card-title">Warning card title</h5> <p class="card-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu sem tempor, varius quam at.</p> </div> </div> <div class="card text-white bg-info mb-3" style="width: 20rem;"> <div class="card-body"> <h5 class="card-title">Info card title</h5> <p class="card-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu sem tempor, varius quam at.</p> </div> </div> <div class="card bg-light mb-3" style="width: 20rem;"> <div class="card-body"> <h5 class="card-title">Light card title</h5> <p class="card-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu sem tempor, varius quam at.</p> </div> </div> <div class="card text-white bg-dark mb-3" style="width: 20rem;"> <div class="card-body"> <h5 class="card-title">Dark card title</h5> <p class="card-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu sem tempor, varius quam at.</p> </div> </div> </div> </body> </html>