Wednesday 15 September 2021

Bootstrap Alerts

Bootstrap Alerts provides contextual feedback messages for typical user actions with a handful of available and flexible alert messages. Bootstrap provides an easy way to create predefined alert messages with Bootstrap Alert.

Bootstrap Alert Example

Bootstrap Alerts are available for any length of text, as well as an optional dismiss button. For proper styling, use one of the required contextual classes alert-primary, alert-secondary,alert-success,alert-danger,alert-warning,alert-info,alert-dark.

Code :

<!DOCTYPE html>
<html lang="en">

<title>Bootstrap Alerts Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="">
<script src=""></script>
<script src=""></script>
<script src=""></script>


<div class="container">
<h2>Bootstrap Alerts</h2>

<div class="alert alert-primary" role="alert">
This is a bootstrap primary alert. Use class="alert alert-primary".

<div class="alert alert-secondary" role="alert">
This is a bootstrap secondary alert. Use class="alert alert-secondary".

<div class="alert alert-success" role="alert">
This is a bootstrap success alert. Use class="alert alert-success".

<div class="alert alert-danger" role="alert">
This is a bootstrap danger alert. Use class="alert alert-danger".

<div class="alert alert-warning" role="alert">
This is a bootstrap warning alert. Use class="alert alert-warning".

<div class="alert alert-info" role="alert">
This is a bootstrap info alert. Use class="alert alert-info".

<div class="alert alert-dark" role="alert">
This is a bootstrap dark alert. Use class="alert alert-dark".


Output :

Bootstrap Alerts


Post a Comment

Please do not enter any spam link in the message box.