Overview
Note: tables are opt-in.
| # |
First |
Last |
Handle |
| 1 |
Mark |
Otto |
@mdo |
| 2 |
Jacob |
Thornton |
@fat |
| 3 |
Larry the Bird |
@twitter |
Variants
| 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 |
Conveying meaning to assistive technologies
Using color to add meaning only provides a visual indication, which will not be conveyed to users of assistive technologies – such as screen readers. Ensure that information denoted by the color is either obvious from the content itself (e.g. the visible text), or is included through alternative means, such as additional text hidden with the .visually-hidden class.
Accented tables
Striped rows
| # |
First |
Last |
Handle |
| 1 |
Mark |
Otto |
@mdo |
| 2 |
Jacob |
Thornton |
@fat |
| 3 |
Larry the Bird |
@twitter |
These classes can also be added to table variants:
| # |
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 |
| # |
First |
Last |
Handle |
| 1 |
Mark |
Otto |
@mdo |
| 2 |
Jacob |
Thornton |
@fat |
| 3 |
Larry the Bird |
@twitter |
These hoverable rows can also be combined with the striped variant:
| # |
First |
Last |
Handle |
| 1 |
Mark |
Otto |
@mdo |
| 2 |
Jacob |
Thornton |
@fat |
| 3 |
Larry the Bird |
@twitter |
Active rows and cells
| # |
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 |
Table borders
Bordered tables
| # |
First |
Last |
Handle |
| 1 |
Mark |
Otto |
@mdo |
| 2 |
Jacob |
Thornton |
@fat |
| 3 |
Larry the Bird |
@twitter |
Border color utilities can be added to change colors:
| # |
First |
Last |
Handle |
| 1 |
Mark |
Otto |
@mdo |
| 2 |
Jacob |
Thornton |
@fat |
| 3 |
Larry the Bird |
@twitter |
Tables without borders
| # |
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 |
Small tables
| # |
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 |
Vertical alignment
| Heading 1 |
Heading 2 |
Heading 3 |
Heading 4 |
This cell inherits vertical-align: middle; from the table |
This cell inherits vertical-align: middle; from the table |
This cell inherits vertical-align: middle; from the table |
Nulla vitae elit libero, a pharetra augue. Cras mattis consectetur purus sit amet fermentum. Vestibulum id ligula porta felis euismod semper. |
This cell inherits vertical-align: bottom; from the table row |
This cell inherits vertical-align: bottom; from the table row |
This cell inherits vertical-align: bottom; from the table row |
Nulla vitae elit libero, a pharetra augue. Cras mattis consectetur purus sit amet fermentum. Vestibulum id ligula porta felis euismod semper. |
This cell inherits vertical-align: middle; from the table |
This cell inherits vertical-align: middle; from the table |
This cell is aligned to the top. |
Nulla vitae elit libero, a pharetra augue. Cras mattis consectetur purus sit amet fermentum. Vestibulum id ligula porta felis euismod semper. |
Nesting
| # |
First |
Last |
Handle |
| 1 |
Mark |
Otto |
@mdo |
| Header |
Header |
Header |
| A |
First |
Last |
| B |
First |
Last |
| C |
First |
Last |
|
| 3 |
Larry |
the Bird |
@twitter |
Anatomy
Table head
| # |
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 |
| # |
First |
Last |
Handle |
| 1 |
Mark |
Otto |
@mdo |
| 2 |
Jacob |
Thornton |
@fat |
| 3 |
Larry |
the Bird |
@twitter |
| Footer |
Footer |
Footer |
Footer |
Captions
List of users
| # |
First |
Last |
Handle |
| 1 |
Mark |
Otto |
@mdo |
| 2 |
Jacob |
Thornton |
@fat |
| 3 |
Larry the Bird |
@twitter |
List of users
| # |
First |
Last |
Handle |
| 1 |
Mark |
Otto |
@mdo |
| 2 |
Jacob |
Thornton |
@fat |
| 3 |
Larry |
the Bird |
@twitter |
Responsive tables
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 |
Heading |
Heading |
Heading |
Heading |
Heading |
Heading |
Heading |
Heading |
| 1 |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
| 2 |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
| 3 |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Breakpoint specific
These tables may appear broken until their responsive styles apply at specific viewport widths.
| # |
Heading |
Heading |
Heading |
Heading |
Heading |
Heading |
Heading |
Heading |
| 1 |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
| 2 |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
| 3 |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
| # |
Heading |
Heading |
Heading |
Heading |
Heading |
Heading |
Heading |
Heading |
| 1 |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
| 2 |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
| 3 |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
| # |
Heading |
Heading |
Heading |
Heading |
Heading |
Heading |
Heading |
Heading |
| 1 |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
| 2 |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
| 3 |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
| # |
Heading |
Heading |
Heading |
Heading |
Heading |
Heading |
Heading |
Heading |
| 1 |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
| 2 |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
| 3 |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
| # |
Heading |
Heading |
Heading |
Heading |
Heading |
Heading |
Heading |
Heading |
| 1 |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
| 2 |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
| 3 |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |
Cell |