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 border-primary mb-3" style="width: 20rem;"> <div class="card-body text-primary"> <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 border-secondary mb-3" style="width: 20rem;"> <div class="card-body text-secondary"> <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 border-success mb-3" style="width: 20rem;"> <div class="card-body text-success"> <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 border-danger mb-3" style="width: 20rem;"> <div class="card-body text-danger"> <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 border-warning mb-3" style="width: 20rem;"> <div class="card-body text-warning"> <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 border-info mb-3" style="width: 20rem;"> <div class="card-body text-info"> <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 border-light mb-3" style="width: 20rem;"> <div class="card-body text-muted"> <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 border-dark mb-3" style="width: 20rem;"> <div class="card-body text-dark"> <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>