- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
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
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 = "/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>
- Related Articles
- Bootstrap warning Contextual class
- Bootstrap active Contextual class
- Bootstrap success Contextual class
- Bootstrap danger Contextual class
- Contextual button for informational alert messages with Bootstrap
- Bootstrap Helper Classes
- Bootstrap responsive utility classes
- Bootstrap Button Group Classes
- What are contextual keywords in C#?
- Pseudo-classes and CSS Classes
- Pseudo-classes and all CSS Classes
- PHP Anonymous classes
- PHP Autoloading Classes
- C# Nested Classes
- Python Exception Base Classes

Advertisements