Basic table

Add the base class .table to any <table>, then extend with our optional modifier classes or custom styles. All table styles are not inherited in Bootstrap, meaning any nested tables can be styled independent from the parent.

#HeadHeadHead
1DataDataData
2DataDataData
3DataDataData

Contextual colors

Use contextual classes to color tables, table rows or individual cells (e.q .table-primary).

#HeadHeadHead
1DataDataData
#HeadHeadHead
1DataDataData
#HeadHeadHead
1DataDataData
#HeadHeadHead
1DataDataData
#HeadHeadHead
1DataDataData
#HeadHeadHead
1DataDataData
#HeadHeadHead
1DataDataData
#HeadHeadHead
1DataDataData

Hoverable & active

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

These hoverable rows can also be combined with the striped variant:

#HeadHeadHead
1DataDataData
2DataDataData
3DataDataData

Highlight a table row or cell by adding a .table-active class.

Nesting

Border styles, active styles, and table variants are not inherited by nested tables.

#HeadHeadHead
1DataDataData
SubheadSubheadSubhead
ASubdataSubdata
BSubdataSubdata
CSubdataSubdata
3DataDataData

Header & footer

Use the modifier classes .table-{color} to <thead>.

#HeadHeadHead
1DataDataData
2DataDataData
FootFootFootFoot

Vertical alignment

Table cells of <thead> are always vertical aligned to the bottom. Table cells in <tbody> inherit their alignment from <table> and are aligned to the the top by default.

Heading 1Heading 2Heading 3Heading 4
This cell is aligned to the top.This cell is aligned to the middle.This cell is aligned to the bottom.This here is some placeholder text, intended to take up quite a bit of vertical space, to demonstrate how the vertical alignment works in the preceding cells.

Border variants

Add .table-bordered for borders on all sides of the table and cells.

#HeadHeadHead
1DataDataData
2DataDataData
3Long dataData

Add .table-borderless for a table without borders.

#HeadHeadHead
1DataDataData
2DataDataData
3Long dataData

Striped

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

#HeadHeadHead
1DataDataData
2DataDataData
3DataDataData

Use .table-striped-columns to add zebra-striping to any table column.

#HeadHeadHead
1DataDataData
2DataDataData
3DataDataData

These classes can also be added to table variants:

#HeadHeadHead
1DataDataData
2DataDataData
3DataDataData
#HeadHeadHead
1DataDataData
2DataDataData
3DataDataData

Small table

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

#HeadHeadHead
1DataDataData
2DataDataData
3Long dataData

Table group dividers

Add a thicker border, darker between table groups—<thead>, <tbody>, and <tfoot>—with .table-group-divider. Customize the color by changing the border-top-color (which we don’t currently provide a utility class for at this time).

#HeadHeadHead
1DataDataData
2DataDataData
3Long dataData

Responsive table

Make your tables always responsive, use .table-responsive for horizontally scrolling tables.

Use .table-responsive{-sm|-md|-lg|-xl|-xxl} 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.

#HeadHeadHeadHeadHeadHeadHeadHeadHeadHeadHeadHead
1DataDataDataDataDataDataDataDataDataDataDataData
2DataDataDataDataDataDataDataDataDataDataDataData
3DataDataDataDataDataDataDataDataDataDataDataData

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
#HeadHeadHead
1DataDataData

You can also put the <caption> on the top of the table with .caption-top.

CS

Charlie Stone

Art Director

Upcoming events

12:00

Donec laoreet fringilla justo a pellentesque

13:20

Nunc quis massa nec enim

14:00

Praesent sit amet

Reports

Navigation

Settings

Performance

CPU Load
60%
CPU Temparature
42°
RAM Usage
6,532 MB

Customer care

Reports

Projects

May 14, 2020

Upcoming events

12:00

Donec laoreet fringilla justo a pellentesque

13:20

Nunc quis massa nec enim

14:00

Praesent sit amet