ShapeYourPath
(current)
Run Code
Live Code Editor- Bootstrap 5 Card Border and Text Color
Source Code
<!doctype html> <html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <!-- Bootstrap CSS --> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet"> <title>Bootstrap 5 Card Border and Text Color</title> </head> <body> <h1 class="text-center">Bootstrap 5 Card Border & Text Color</h1> <p class="text-justify text-center">Let us understand bootstrap card border and text color concept.</p> <div class="container"> <div class="row"> <div class="col-12 col-sm-8 offset-sm-2"> <div class="row"> <div class="col-sm-6"> <div class="card border-primary mb-4"> <div class="card-body text-primary"> <h5 class="card-title">Primary card title</h5> <p class="card-text">Describe card text.</p> </div> </div> </div> <div class="col-sm-6"> <div class="card border-secondary mb-4"> <div class="card-body text-secondary"> <h5 class="card-title">Secondary card title</h5> <p class="card-text">Describe card text</p> </div> </div> </div> <div class="col-sm-6"> <div class="card border-success mb-4"> <div class="card-body text-success"> <h5 class="card-title">Success card title</h5> <p class="card-text">Describe card text</p> </div> </div> </div> <div class="col-sm-6"> <div class="card border-danger mb-4"> <div class="card-body text-danger"> <h5 class="card-title">Danger card title</h5> <p class="card-text">Describe card text</p> </div> </div> </div> <div class="col-sm-6"> <div class="card border-warning mb-4"> <div class="card-body text-warning"> <h5 class="card-title">Warning card title</h5> <p class="card-text">Describe card text.</p> </div> </div> </div> <div class="col-sm-6"> <div class="card border-info mb-4"> <div class="card-body text-info"> <h5 class="card-title">Info card title</h5> <p class="card-text">Describe card text</p> </div> </div> </div> <div class="col-sm-6"> <div class="card border-dark mb-4"> <div class="card-body text-dark"> <h5 class="card-title">Dark card title</h5> <p class="card-text">Describe card text.</p> </div> </div> </div> <div class="col-sm-6"> <div class="card border-light mb-4"> <div class="card-body text-muted"> <h5 class="card-title">Light card title</h5> <p class="card-text">Describe card text.</p> </div> </div> </div> </div> </div><!--/offset-sm-2--> </div><!--/row--> </div><!--/container--> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js"></script> </body> </html>
Output :
Running