Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Matching Links Color inside Bootstrap Alerts</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"></script> </head> <body> <div class="m-4"> <!-- Success Alert --> <div class="alert alert-success alert-dismissible fade show"> <strong>Success!</strong> A simple success alert with <a href="#" class="alert-link">an example link</a>. <button type="button" class="btn-close" data-bs-dismiss="alert"></button> </div> <!-- Error Alert --> <div class="alert alert-danger alert-dismissible fade show"> <strong>Error!</strong> A simple danger alert with <a href="#" class="alert-link">an example link</a>. <button type="button" class="btn-close" data-bs-dismiss="alert"></button> </div> <!-- Warning Alert --> <div class="alert alert-warning alert-dismissible fade show"> <strong>Warning!</strong> A simple warning alert with <a href="#" class="alert-link">an example link</a>. <button type="button" class="btn-close" data-bs-dismiss="alert"></button> </div> <!-- Info Alert --> <div class="alert alert-info alert-dismissible fade show"> <strong>Info!</strong> A simple info alert with <a href="#" class="alert-link">an example link</a>. <button type="button" class="btn-close" data-bs-dismiss="alert"></button> </div> <!-- Primary Alert --> <div class="alert alert-primary alert-dismissible fade show"> <strong>Primary!</strong> A simple primary alert with <a href="#" class="alert-link">an example link</a>. <button type="button" class="btn-close" data-bs-dismiss="alert"></button> </div> <!-- Secondary Alert --> <div class="alert alert-secondary alert-dismissible fade show"> <strong>Secondary!</strong> A simple secondary alert with <a href="#" class="alert-link">an example link</a>. <button type="button" class="btn-close" data-bs-dismiss="alert"></button> </div> <!-- Dark Alert --> <div class="alert alert-dark alert-dismissible fade show"> <strong>Dark!</strong> A simple dark alert with <a href="#" class="alert-link">an example link</a>. <button type="button" class="btn-close" data-bs-dismiss="alert"></button> </div> <!-- Light Alert --> <div class="alert alert-light alert-dismissible fade show"> <strong>Light!</strong> A simple light alert with <a href="#" class="alert-link">an example link</a>. <button type="button" class="btn-close" data-bs-dismiss="alert"></button> </div> </div> </body> </html>