Bootstrap Home

Tables

Basic Table

The .table class adds basic styling (light padding and horizontal dividers) to a table.


City State Region
Boston Massachusetts New England
Phoenix Arizona Southwest
Atlanta Georgia Southeast
Detroit Michigan Great Lakes

Striped Rows

The .table-striped class adds zebra-stripes to a table.


City State Region
Boston Massachusetts New England
Phoenix Arizona Southwest
Atlanta Georgia Southeast
Detroit Michigan Great Lakes

Bordered Table

The .table-bordered class adds borders on all sides of the table and the cells.


City State Region
Boston Massachusetts New England
Phoenix Arizona Southwest
Atlanta Georgia Southeast
Detroit Michigan Great Lakes

Hover Rows

The .table-hover class enables a hover state (grey background on mouse over) on table rows.


City State Region
Boston Massachusetts New England
Phoenix Arizona Southwest
Atlanta Georgia Southeast
Detroit Michigan Great Lakes

Black/Dark Table

The .table-dark class adds a black background to the table.


City State Region
Boston Massachusetts New England
Phoenix Arizona Southwest
Atlanta Georgia Southeast
Detroit Michigan Great Lakes

Dark Striped Table

Combine .table-dark and .table-striped to create a dark, striped table.


City State Region
Boston Massachusetts New England
Phoenix Arizona Southwest
Atlanta Georgia Southeast
Detroit Michigan Great Lakes

Hoverable Dark Table

The .table-hover class adds a hover effect (grey background color) on table rows.


City State Region
Boston Massachusetts New England
Phoenix Arizona Southwest
Atlanta Georgia Southeast
Detroit Michigan Great Lakes

Borderless Table

The .table-borderless class removes borders from the table.


City State Region
Boston Massachusetts New England
Phoenix Arizona Southwest
Atlanta Georgia Southeast
Detroit Michigan Great Lakes

Contextual Classes

Contextual classes can be used to color the table, table rows or table cells. The classes that can be used are: .table-primary, .table-success, .table-info, .table-warning, .table-danger, .table-active, .table-secondary, .table-light and .table-dark.


City State Region
Boston Massachusetts New England
Phoenix Arizona Southwest
Atlanta Georgia Southeast
Detroit Michigan Great Lakes

Small Table

The .table-sm class makes the table smaller by cutting cell padding in half.


City State Region
Boston Massachusetts New England
Phoenix Arizona Southwest
Atlanta Georgia Southeast
Detroit Michigan Great Lakes

Responsive Table

The .table-responsive class adds a scrollbar to the table when needed (when it is too big horizontally).


City State Region Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example
Boston Massachusetts New England Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
Phoenix Arizona Southwest Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
Atlanta Georgia Southeast Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
Detroit Michigan Great Lakes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes