- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Create a red color alert box that indicates a dangerous action in Bootstrap
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
<!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>
- Related Articles
- Create a green color alert box that indicates a positive action in Bootstrap
- Create a yellow color alert box that indicates caution in Bootstrap
- Create a light-blue alert box that indicates some information with Bootstrap
- Create a red button that indicates danger in Bootstrap
- Create an alert message box with Bootstrap
- Show dangerous action on a table row with Bootstrap
- Add a red background color to an element to set danger action with Bootstrap
- Set negative action for Bootstrap 4 cards with red background color
- Indicate a dangerous action to a particular table row or cell with Bootstrap
- Add a fading effect when closing an alert box in Bootstrap
- How to change the color of the alert box in JavaScript?
- Create a padded grey box with rounded corners in Bootstrap
- Add a green background color to an element to set positive action with Bootstrap
- Add a yellow background color to an element to set warning action with Bootstrap
- How I can replace a JavaScript alert pop up with a fancy alert box?

Advertisements