ShapeYourPath
(current)
Run Code
Live Code Editor- Bootstrap 4 Alert Box
Source Code
<html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- Bootstrap CSS --> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css"> <title>Bootstrap 4 Alert Box</title> </head> <body> <div class="container my-5 text-center"> <h1 class="my-3">Bootstrap 4 Alert Box</h1> <p>Add .alert followed by one of the contextual class to the parent container of alert box..</p> <div class="alert alert-success"> <strong>Success!</strong> This is a success alert box. </div> <div class="alert alert-info"> <strong>Info!</strong> This is a info alert box. </div> <div class="alert alert-warning"> <strong>Warning!</strong> This is a warning alert box. </div> <div class="alert alert-danger"> <strong>Danger!</strong> This is a danger alert box.. </div> <div class="alert alert-primary"> <strong>Primary!</strong> This is a primary alert box.. </div> <div class="alert alert-secondary"> <strong>Secondary!</strong> This is secondary alert box. </div> <div class="alert alert-dark"> <strong>Dark!</strong> This is dark alert box. </div> <div class="alert alert-light"> <strong>Light!</strong> This is light alert box. </div> </div> <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.min.js"></script> </body> </html>
Output :
Running