BBS5 Tables
Learn how to style tables with Bootstrap 5.
BS5 Tables
Bootstrap 5 provides a basic table style with light padding and horizontal dividers. The .table class adds basic styling to a table.
Table Classes
.table-stripedadds zebra-stripes to a table.table-borderedadds borders on all sides of the table and cells.table-hoveradds a hover effect (grey background color) on table rows.table-darkadds a black background to the table.table-borderlessremoves borders from the table.table-smmakes the table more compact by cutting cell padding in half.table-responsivemakes the table responsive (adds a scrollbar if the screen is too small)
Contextual Classes
Contextual classes can be used to color table rows (<tr>) or table cells (<td>):
.table-primary,.table-success,.table-danger, etc.
Examples
Basic Table
html/cssStriped Rows
html/cssBordered Table
html/css