Tables
Documentation and examples for opt-in styling of tables (given their prevalent use in JavaScript plugins) with Bootstrap.
Bootstrap documentation →
Overview
Using the most basic table markup, here’s how .table-based tables look in Bootstrap.
# |
First |
Last |
Handle |
1 |
Mark |
Otto |
@mdo |
2 |
Jacob |
Thornton |
@fat |
3 |
Larry the Bird |
@twitter |
Variants
Use contextual classes to color tables, table rows or individual cells.
Class |
Heading |
Heading |
Default |
Cell |
Cell |
Primary |
Cell |
Cell |
Secondary |
Cell |
Cell |
Success |
Cell |
Cell |
Danger |
Cell |
Cell |
Warning |
Cell |
Cell |
Info |
Cell |
Cell |
Light |
Cell |
Cell |
Dark |
Cell |
Cell |
Accented tables
Striped rows
Use .table-striped
to add zebra-striping to any table row within the <tbody>
.
# |
First |
Last |
Handle |
1 |
Mark |
Otto |
@mdo |
2 |
Jacob |
Thornton |
@fat |
3 |
Larry the Bird |
@twitter |
# |
First |
Last |
Handle |
1 |
Mark |
Otto |
@mdo |
2 |
Jacob |
Thornton |
@fat |
3 |
Larry the Bird |
@twitter |
Hoverable rows
Add .table-hover
to enable a hover state on table rows within a <tbody>
.
# |
First |
Last |
Handle |
1 |
Mark |
Otto |
@mdo |
2 |
Jacob |
Thornton |
@fat |
3 |
Larry the Bird |
@twitter |
Bordered tables
Add .table-bordered
for borders on all sides of the table and cells.
# |
First |
Last |
Handle |
1 |
Mark |
Otto |
@mdo |
2 |
Jacob |
Thornton |
@fat |
3 |
Larry the Bird |
@twitter |