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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 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 |
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 |
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 |