Default Table

Using the most basic table markup, here’s how .table-based tables look in Bootstrap. All table styles are inherited in Bootstrap 4, meaning any nested tables will be styled in the same manner as the parent.
Table With Outside Padding
#CountryAreaPopulation
1 Russia 17,075,200146,989,754
2 Canada 9,976,14036,624,199
3 United States 9,629,091324,459,463
4 China 9,596,9601,409,517,397
Table Without Outside Padding
#CountryAreaPopulation
1 Russia 17,075,200146,989,754
2 Canada 9,976,14036,624,199
3 United States 9,629,091324,459,463
4 China 9,596,9601,409,517,397

Table Header

Similar to tables, use the modifier classes .thead-light to make <thead>s appear light.
#FirstLastHandle
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter

Striped rows

Use .table-striped to add zebra-striping to any table row within the <tbody>.
#FirstLastHandle
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter

Boredered Table

Add .table-bordered for borders on all sides of the table and cells.
#FirstLastHandle
1MarkOtto@mdo
2JacobThornton@fat
3Larry the Bird@twitter

Hoverable Rows

Add .table-hover to enable a hover state on table rows within a <tbody>.
#FirstLastHandle
1MarkOtto@mdo
2JacobThornton@fat
3Larry the Bird@twitter

Contextual Table

Use contextual classes to color table rows or individual cells.
ClassHeadingHeading
ActiveCellCell
DefaultCellCell
PrimaryCellCell
SecondaryCellCell
SuccessCellCell
DangerCellCell
WarningCellCell
InfoCellCell
LightCellCell
DarkCellCell

Table With Caption

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
#FirstLastHandle
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter

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 .
#HeadingHeadingHeadingHeadingHeadingHeadingHeadingHeadingHeadingHeadingHeadingHeadingHeadingHeading
1CellCellCellCellCellCellCellCellCellCellCellCellCellCell
2CellCellCellCellCellCellCellCellCellCellCellCellCellCell
3CellCellCellCellCellCellCellCellCellCellCellCellCellCell
#Table headerTable headerTable headerTable headerTable headerTable header
1Table cellTable cellTable cellTable cellTable cellTable cell
2Table cellTable cellTable cellTable cellTable cellTable cell
3Table cellTable cellTable cellTable cellTable cellTable cell

Breakpoint Specific

Use .table-responsive(-sm|-md|-lg|-xl) as needed to create responsive tables up to a particular breakpoint. From that breakpoint and up, the table will behave normally and not scroll horizontally.
#HeadingHeadingHeadingHeadingHeading
1CellCellCellCellCell
2CellCellCellCellCell
3CellCellCellCellCell
#HeadingHeadingHeadingHeadingHeading
1CellCellCellCellCell
2CellCellCellCellCell
3CellCellCellCellCell
#HeadingHeadingHeadingHeadingHeading
1CellCellCellCellCell
2CellCellCellCellCell
3CellCellCellCellCell
#HeadingHeadingHeadingHeadingHeading
1CellCellCellCellCell
2CellCellCellCellCell
3CellCellCellCellCell