Cheap VPS & Xen Server

Residential Proxy Network - Hourly & Monthly Packages

Bootstrap Alerts

Bootstrap Alerts are used to provide an easy way to create predefined alert messages. Alert adds a style to your messages to make it more appealing to the users.

There are four classes that are used within <div> element for alerts.

  • .alert-success
  • .alert-info
  • .alert-warning
  • .alert-danger

Bootstrap Alert Example

  1.     <!DOCTYPE html>
  2. <html lang=“en”>
  3. <head>
  4.   <title>Bootstrap Example</title>
  5.   <meta charset=“utf-8”>
  6.   <meta name=“viewport” content=“width=device-width, initial-scale=1”>
  7.   <link rel=“stylesheet” href=“”>
  8.   <script src=“”></script>
  9.   <script src=“”></script>
  10. </head>
  11. <body>
  12. <div class=“container”>
  13.   <h2>Alerts</h2>
  14.   <div class=“alert alert-success”>
  15.     <strong>Success!</strong> This alert box indicates a successful or positive action.
  16.   </div>
  17.   <div class=“alert alert-info”>
  18.     <strong>Info!</strong> This alert box indicates a neutral informative change or action.
  19.   </div>
  20.   <div class=“alert alert-warning”>
  21.     <strong>Warning!</strong> This alert box indicates a warning that might need attention.
  22.   </div>
  23.   <div class=“alert alert-danger”>
  24.     <strong>Danger!</strong> This alert box indicates a dangerous or potentially negative action.
  25. </div>
  26. </div>
  27. </body>
  28. </html>