Add the base class .table to any <table>, then
extend with our optional modifier classes or custom styles.
| Product Name | Category | Price | Stock | Rating | Status | Actions |
|---|---|---|---|---|---|---|
| {{ product.name }} | {{ product.category }} | ${{ product.price.toFixed(2) }} | {{ product.stock }} | {{ product.rating.toFixed(1) }} ★ | {{ product.status }} |
Add the base classes .table and .table-custom to any
<table> element to apply custom styling, including spacing for the first
and last table cells.
Use contextual classes to color tables, table rows or individual cells.
| Product Name | Category | Price | Stock | Rating | Status | Actions |
|---|---|---|---|---|---|---|
| Bluetooth Speaker | Audio | $49.00 | 200 | 4.6 ★ | Active | |
| Leather Wallet | Accessories | $29.99 | 150 | 4.3 ★ | Active | |
| Fitness Tracker | Wearables | $89.00 | 60 | 4.1 ★ | Limited Stock | |
| 4K Monitor | Electronics | $349.00 | 30 | 4.8 ★ | Active | |
| Standing Desk | Furniture | $499.00 | 10 | 4.4 ★ | New |
Use .table-striped to add zebra-striping to any table row within the
<tbody>.
Use .table-striped-columns to add zebra-striping to any table column.
Add .table-hover to enable a hover state on table rows within a
<tbody>
Highlight a table row or cell by adding a .table-active class.
Add .table-bordered for borders on all sides of the table and cells.
Add .table-borderless for a table without borders.
Add .table-sm to make any .table more compact by cutting all cell
padding in half.
| Product Name | Category | Price | Stock | Rating |
|---|---|---|---|---|
| {{ product.name }} | {{ product.category }} | ${{ product.price.toFixed(2) }} | {{ product.stock }} | {{ product.rating.toFixed(1) }} ★ |
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).
Border styles, active styles, and table variants are not inherited by nested tables.
| Product Name | Category | Price | Stock | Rating | Status | Actions | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ product.name }} | {{ product.category }} | ${{ product.price.toFixed(2) }} | {{ product.stock }} | {{ product.rating.toFixed(1) }} ★ | {{ product.status }} | |||||||||
|
||||||||||||||
Similar to tables and dark tables, use the modifier classes .table-light or
.table-dark to make <thead>s appear light or dark gray.
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.