Basic Tables

Using the most basic table Leanne Grahamup, here’s how .table-based tables look in Bootstrap. You can use any example of below table for your table and it can be use with any type of bootstrap tables.

Example 1:Table with outer spacing

IDNameEmailUser ID
1Leanne Grahamsincere@april.biz@mdo
2Ervin Howellshanna@melissa.tv@fat
3Clementine Bauchnathan@yesenia.net@twitter

Example 2:Minimal Table with no outer spacing.

IDNameEmailUser ID
1Leanne Grahamsincere@april.biz@mdo
2Ervin Howellshanna@melissa.tv@fat
3Clementine Bauchnathan@yesenia.net@twitter

Inverse table

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

IDNameEmailUser ID
1Leanne Grahamsincere@april.biz@mdo
2Ervin Howellshanna@melissa.tv@fat
3Clementine Bauchnathan@yesenia.net@twitter

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

IDNameEmailUser ID
1Leanne Grahamsincere@april.biz@mdo
2Ervin Howellshanna@melissa.tv@fat
3Clementine Bauchnathan@yesenia.net@twitter

Table head options

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

IDNameEmailUser ID
1Leanne Grahamsincere@april.biz@mdo
2Ervin Howellshanna@melissa.tv@fat
3Clementine Bauchnathan@yesenia.net@twitter

Table Hover Animation

Add .table-hover-animationto enable a hover stat with animation on table rows within a <tbody>.

IDNameEmailUser ID
1Leanne Grahamsincere@april.biz@mdo
2Ervin Howellshanna@melissa.tv@fat
3Clementine Bauchnathan@yesenia.net@twitter

Striped rows

Use .table-stripedto add zebra-striping to any table row within the <tbody>. This styling doesn't work in IE8 and below as :nth-childCSS selector isn't supported.

IDNameEmailUser ID
1Leanne Grahamsincere@april.biz@mdo
2Ervin Howellshanna@melissa.tv@fat
3Clementine Bauchnathan@yesenia.net@twitter

Striped rows with inverse dark

Use .table-darkwith .table-stripedto add zebra-striping to any inverse table row within the <tbody>. This styling doesn't work in IE8 and below as :nth-childCSS selector isn't supported.

IDNameEmailUser ID
1Leanne Grahamsincere@april.biz@mdo
2Ervin Howellshanna@melissa.tv@fat
3Clementine Bauchnathan@yesenia.net@twitter

Bordered table

Add .table-borderedfor borders on all sides of the table and cells. For Inverse Dark Table, add .table-darkalong with .table-bordered.

IDNameEmailUser ID
1Leanne Grahamsincere@april.biz@mdo
2Leanne Grahamsincere@april.biz@TwBootstrap
3Ervin Howellshanna@melissa.tv@fat
4Clementine Bauchnathan@yesenia.net@twitter

Borderless Table

Add .table-borderlessfor a table without borders. It can also be used on dark tables.

IDNameEmailUser ID
1Leanne Grahamsincere@april.biz@mdo
2Leanne Grahamsincere@april.biz@TwBootstrap
3Ervin Howellshanna@melissa.tv@fat
4Clementine Bauchnathan@yesenia.net@twitter

Hoverable rows

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

IDNameEmailUser ID
1Leanne Grahamsincere@april.biz@mdo
2Ervin Howellshanna@melissa.tv@fat
3Clementine Bauchnathan@yesenia.net@twitter

Contextual classes

Use contextual classes to color table rows or individual cells. Read full documnetation here.

IDNameEmailUser ID
1Leanne Grahamsincere@april.biz@mdo
2Ervin Howellshanna@melissa.tv@fat
3Clementine BauchGraham@twitter
4Ervinnathan@yesenia.net@gmail
5Clementine Bauchnathan@yesenia.net@messanger
6Patricia Lebsackjulianne.OConner@kory.org@twitter
7Chelsey Dietrichlucio_Hettinger@annie.ca@messanger
8Kurtis Weissnattelly.Hoeger@billy.biz@fat
9Glenna Reichertchaim_McDermott@dana.io@mdo

Responsive tables

Responsive tables allow tables to be scrolled horizontally with ease. Make any table responsive across all viewports by adding .table-responsiveclass on .table. Or, pick a maximum breakpoint with which to have a responsive table up to by adding .table-responsive{-sm|-md|-lg|-xl}. Read full documnetation here.

Vertical clipping/truncation

Responsive tables make use of overflow-y: hidden, which clips off any content that goes beyond the bottom or top edges of the table. In particular, this can clip off dropdown menus and other third-party widgets.

Always responsive
#Heading 1Heading 2Heading 3Heading 4Heading 5Heading 6Heading 7Heading 8Heading 9Heading 10Heading 11Heading 12Heading 13
1Table cellTable cellTable cellTable cellTable cellTable cellTable cellTable cellTable cellTable cellTable cellTable cellTable cell
2Table cellTable cellTable cellTable cellTable cellTable cellTable cellTable cellTable cellTable cellTable cellTable cellTable cell
3Table cellTable cellTable cellTable cellTable cellTable cellTable cellTable cellTable cellTable cellTable cellTable cellTable cell