Default table
Add the base class .table
to any table.
# | First | Last | Handle |
---|---|---|---|
1 | Mark | Otto | @mdo |
2 | Jacob | Thornton | @fat |
3 | Larry | the Bird | |
4 | Mark | Otto | @mdo |
5 | Jacob | Thornton | @fat |
6 | Larry | the Bird | |
7 | Jacob | Thornton | @fat |
Table head options
Add the class .thead-light
or .thead-dark
to make light
or dark gray table head.
# | First | Last | Handle |
---|---|---|---|
1 | Mark | Otto | @mdo |
2 | Jacob | Thornton | @fat |
3 | Larry | the Bird |
# | First | Last | Handle |
---|---|---|---|
1 | Mark | Otto | @mdo |
2 | Jacob | Thornton | @fat |
3 | Larry | the Bird |
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 | |
4 | Mark | Otto | @mdo |
5 | Jacob | Thornton | @fat |
6 | Larry | the Bird |
Bordered table
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 | ||
4 | Mark | Otto | @mdo |
5 | Jacob | Thornton | @fat |
Borderless table
Add .table-borderless
for a table without borders.
# | First | Last | Handle |
---|---|---|---|
1 | Mark | Otto | @mdo |
2 | Jacob | Thornton | @fat |
3 | Mark | Otto | @mdo |
4 | Jacob | Thornton | @fat |
Hoverable table
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 |
4 | Mark | Otto | @mdo |
5 | Jacob | Thornton | @fat |
Small table
Add .table-sm
to make tables more compact by cutting cell padding in
half.
# | First | Last | Handle |
---|---|---|---|
1 | Mark | Otto | @mdo |
2 | Jacob | Thornton | @fat |
3 | Mark | Otto | @mdo |
4 | Jacob | Thornton | @fat |
5 | Mark | Otto | @mdo |
6 | Jacob | Thornton | @fat |
Dark table
You can also invert the colors — with light text on dark backgrounds—with
.table-dark
.
# | First | Last | Handle |
---|---|---|---|
1 | Mark | Otto | @mdo |
2 | Jacob | Thornton | @fat |
4 | Mark | Otto | @mdo |
5 | Jacob | Thornton | @fat |