
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Bootstrap Contextual classes
The Bootstrap Contextual Class allows you to change the background color of your table rows or individual cells.
The following are the classes −
Class |
Description |
---|---|
.active |
Applies the hover color to a particular row or cell |
.success |
Indicates a successful or positive action |
.warning |
Indicates a warning that might need attention |
.danger |
Indicates a dangerous or potentially negative action |
Example
The following is an example of the active class −
Example
<!DOCTYPE html> <html> <head> <title>Bootstrap Table</title> <link href="/https/www.tutorialspoint.com/bootstrap/css/bootstrap.min.css" rel="stylesheet"> <script src = "/scripts/jquery.min.js"></script> <script src = "/bootstrap/js/bootstrap.min.js"></script> </head> <body> <table class = "table"> <thead> <tr> <th>Subject</th> <th>Marks</th> <th>Student</th> </tr> </thead> <tbody> <tr class = "active"> <td>Maths</td> <td>90</td> <td>Amit</td> </tr> <tr> <td>Science</td> <td>80</td> <td>Aman</td> </tr> <tr> <td>English</td> <td>85</td> <td>Rahul</td> </tr> </tbody> </table> </body> </html>
Advertisements