Bootstrap table and contextual classes

1. Introduction

In Bootstrap, .table class is used to add basic styling to a table. And there are several other predefined table classes in bootstrap such as –

  • table-striped : Adds stripes to the table
  • table-bordered : Adds border to the table
  • table-hover : Adds hover effect to the table
  • table-condensed : Makes the table compact, removing all the extra cell paddings.
  • table-responsive : Used to create a responsive table.

1.1 Demonstration

Below is the demonstration to some of the above classes –

2. Bootstrap Contextual classes

There are also some predefined contextual classes as well in Bootstrap, that can be used to color rows and columns in a table. Contextual classes can be –


  • success
  • active
  • danger
  • info
  • warning

2.1 Demonstration

Below is the demonstration to some of the above classes –

Receive our updates to your inbox

Get more stuff like this
in your inbox

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.