Tables

The .table class adds basic styling to a table.

#
First
Last
Handle
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter

Table Head Options

Similar to tables and dark tables, use the modifier classes .thead-light or .thead-dark to make <thead>s appear light or dark gray.

#
First
Last
Handle
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter
#
First
Last
Handle
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter

Borderless table

Add .table-borderless for a table without borders.

#
First
Last
Handle
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter

.table-borderless can also be used on dark tables.

#
First
Last
Handle
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter

Small table

Add .table-sm to make tables more compact by cutting cell padding in half.

#
First
Last
Handle
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter
#
First
Last
Handle
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter

Captions

A <caption> functions like a heading for a table. It helps users with screen readers to find a table and understand what it’s about and decide if they want to read it.

List of users
#
First
Last
Handle
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter

Table Dark

You can also invert the colors—with light text on dark backgrounds—with .table-dark.

#
First
Last
Handle
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter

Striped rows

Use .table-striped to add zebra-striping to any table row within the <tbody>.

#
First
Last
Handle
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter
#
First
Last
Handle
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter

Hoverable rows

Add .table-hover to enable a hover state on table rows within a <tbody>.

#
First
Last
Handle
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter
#
First
Last
Handle
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter

Contextual classes

Use contextual classes to color table rows or individual cells.

VariantHeadingHeading
ActiveCellCell
DefaultCellCell
PrimaryCellCell
SecondaryCellCell
SuccessCellCell
DangerCellCell
WarningCellCell
InfoCellCell

Regular table background variants are not available with the dark table, however, you may use text or background utilities to achieve similar styles.

#HeadingHeading
1CellCell
2CellCell
3CellCell
4CellCell
5CellCell
6CellCell
7CellCell
8CellCell
9CellCell

Responsive tables

Responsive tables allow tables to be scrolled horizontally with ease. Make any table responsive across all viewports by wrapping a .table with .table-responsive. Or, pick a maximum breakpoint with which to have a responsive table up to by using .table-responsive{-sm|-md|-lg|-xl}.

#HeadingHeadingHeadingHeadingHeadingHeadingHeadingHeadingHeading
1CellCellCellCellCellCellCellCellCell
2CellCellCellCellCellCellCellCellCell
3CellCellCellCellCellCellCellCellCell
LTR