Create a red color alert box that indicates a dangerous action in Bootstrap

BootstrapWeb DevelopmentCSS Framework

Use the .alert-danger class in Bootstrap to create a red color alert box indicating dangerous action.

You can try to run the following code to implement .alert-danger class −

Example

Live Demo

<!DOCTYPE html>
<html>
   <head>
   <title>Bootstrap Example</title>
      <link rel = "stylesheet" href = "https://maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css">
      <script src = "https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
      <script src = "https://maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
   </head>
   <body>
      <div class = "container">
         <div class = "alert alert-danger">
            <p>Danger!</p>
            <p>Add dangerous action here...</p>
         </div>
     </div>
   </body>
</html>
raja
Published on 22-Jun-2018 12:32:49
Advertisements