Tables
Tables shine when you need to present dense, comparable data—think schedules, price grids, inventories, and research results. Use them to reveal relationships across rows and columns, not to lay out a page; each column should have a clear heading, and every cell should align to a single idea so readers can scan without guesswork.
Structure tables semantically with headers, summaries, and predictable state styling so screen readers and keyboard users get the same clarity as sighted users. Pair responsive patterns—like horizontal scrolling, wrapping labels, or stacked layouts on small screens—with concise copy so the data stays legible across breakpoints.
Basic tables
Basic tables rely on a well-formed skeleton: use <thead> for column headings, <tbody> for the core data, and <tfoot> for summaries or repeated headers. Name the table with a <caption> as its first child: screen readers read it out before the table, and it shows above it. Give every header cell a scope: col for a column heading, row for a heading at the start of a row. Keep columns consistent in type (no mixing currencies with text), and order rows by the dimension that helps readers make the fastest comparisons.
| Name | Position | Office | Age | Start date | Salary |
|---|---|---|---|---|---|
| Name | Position | Office | Age | Start date | Salary |
| Suki Burks | Developer | London | 53 | 2009/10/22 | $114,500 |
| Prescott Bartlett | Technical Author | London | 27 | 2011/05/07 | $145,000 |
| Gavin Cortez | Team Leader | San Francisco | 22 | 2008/10/26 | $235,500 |
| Shad Decker | Regional Director | Edinburgh | 51 | 2008/11/13 | $183,000 |
| Michael Bruce | Javascript Developer | Singapore | 29 | 2011/06/27 | $183,000 |
| Donna Snider | Customer Support | New York | 27 | 2011/01/25 | $112,000 |
| Tiger Nixon | System Architect | Edinburgh | 61 | 2011/04/25 | $320,800 |
| Garrett Winters | Accountant | Tokyo | 63 | 2011/07/25 | $170,750 |
| Ashton Cox | Junior Technical Author | San Francisco | 66 | 2009/01/12 | $86,000 |
| Cedric Kelly | Senior Javascript Developer | Edinburgh | 22 | 2012/03/29 | $433,060 |
| Airi Satou | Accountant | Tokyo | 33 | 2008/11/28 | $162,700 |
| Brielle Williamson | Integration Specialist | New York | 61 | 2012/12/02 | $372,000 |
| Herrod Chandler | Sales Assistant | San Francisco | 59 | 2012/08/06 | $137,500 |
Additional notes: avoid using tables for layout, keep numeric columns right-aligned, and choose concise labels to prevent wrapping overload. Provide captions or summaries for complex datasets, ensure adequate contrast for striped or bordered variants, and expose keyboard-focus styles so interactive cells (like sortable headers) remain discoverable.
<table>
<caption>...</caption>
<thead>
<tr>
<th scope="col">...</th>
<th scope="col">...</th>
<th scope="col">...</th>
</tr>
</thead>
<tbody>
<tr>
<td>...</td>
<td>...</td>
<td>...</td>
</tr>
</tbody>
<tfoot>
<tr>
<th>...</th>
<th>...</th>
<th>...</th>
</tr>
</tfoot>
</table>
Striped
Striped tables use alternating row backgrounds to reduce eye strain and help readers track across wide datasets. They work best for long lists where horizontal scanning is frequent; keep the stripe subtle enough to avoid visual noise, and pair it with clear hover and focus states so keyboard navigation still feels anchored.
| Name | Position | Office | Age | Start date | Salary |
|---|---|---|---|---|---|
| Name | Position | Office | Age | Start date | Salary |
| Martena Mccray | Post-Sales support | Edinburgh | 46 | 2011/03/09 | $324,050 |
| Unity Butler | Marketing Designer | San Francisco | 47 | 2009/12/09 | $85,675 |
| Howard Hatfield | Office Manager | San Francisco | 51 | 2008/12/16 | $164,500 |
| Hermione Butler | Regional Director | London | 47 | 2011/03/21 | $356,250 |
| Lael Greer | Systems Administrator | London | 21 | 2009/02/27 | $103,500 |
| Jonas Alexander | Developer | San Francisco | 30 | 2010/07/14 | $86,500 |
| Rhona Davidson | Integration Specialist | Tokyo | 55 | 2010/10/14 | $327,900 |
| Colleen Hurst | Javascript Developer | San Francisco | 39 | 2009/09/15 | $205,500 |
| Sonya Frost | Software Engineer | Edinburgh | 23 | 2008/12/13 | $103,600 |
| Jena Gaines | Office Manager | London | 30 | 2008/12/19 | $90,560 |
| Quinn Flynn | Support Lead | Edinburgh | 22 | 2013/03/03 | $342,000 |
| Charde Marshall | Regional Director | San Francisco | 36 | 2008/10/16 | $470,600 |
| Haley Kennedy | Senior Marketing Designer | London | 43 | 2012/12/18 | $313,500 |
<table class="striped"></table>
Bordered
Bordered tables delineate each cell with lines, making it easier to read dense numerical or form-like data. Use them when the grid structure needs to be unmistakable—financial reports, matrix comparisons, or audit logs—but keep borders lightweight and consistent so the table doesn’t overpower the surrounding typography.
| Name | Position | Office | Age | Start date | Salary |
|---|---|---|---|---|---|
| Name | Position | Office | Age | Start date | Salary |
| Tatyana Fitzpatrick | Regional Director | London | 19 | 2010/03/17 | $385,750 |
| Michael Silva | Marketing Designer | London | 66 | 2012/11/27 | $198,500 |
| Paul Byrd | Chief Financial Officer (CFO) | New York | 64 | 2010/06/09 | $725,000 |
| Gloria Little | Systems Administrator | New York | 59 | 2009/04/10 | $237,500 |
| Bradley Greer | Software Engineer | London | 41 | 2012/10/13 | $132,000 |
| Dai Rios | Personnel Lead | Edinburgh | 35 | 2012/09/26 | $217,500 |
| Jenette Caldwell | Development Lead | New York | 30 | 2011/09/03 | $345,000 |
| Zorita Serrano | Software Engineer | San Francisco | 56 | 2012/06/01 | $115,000 |
| Jennifer Acosta | Junior Javascript Developer | Edinburgh | 43 | 2013/02/01 | $75,650 |
| Cara Stevens | Sales Assistant | New York | 46 | 2011/12/06 | $145,600 |
<table class="bordered"></table>
Outlined
Outlined tables frame the grid with a clear outer boundary while keeping the interior lighter, giving grouped data a defined footprint without excessive lines. Reach for this style when you want to set a table apart from adjacent content—cards, callouts, or mixed media—yet still keep the cells readable and the header hierarchy obvious.
| Name | Position | Office | Age | Start date | Salary |
|---|---|---|---|---|---|
| Name | Position | Office | Age | Start date | Salary |
| Tatyana Fitzpatrick | Regional Director | London | 19 | 2010/03/17 | $385,750 |
| Michael Silva | Marketing Designer | London | 66 | 2012/11/27 | $198,500 |
| Paul Byrd | Chief Financial Officer (CFO) | New York | 64 | 2010/06/09 | $725,000 |
| Gloria Little | Systems Administrator | New York | 59 | 2009/04/10 | $237,500 |
| Bradley Greer | Software Engineer | London | 41 | 2012/10/13 | $132,000 |
| Dai Rios | Personnel Lead | Edinburgh | 35 | 2012/09/26 | $217,500 |
| Jenette Caldwell | Development Lead | New York | 30 | 2011/09/03 | $345,000 |
| Zorita Serrano | Software Engineer | San Francisco | 56 | 2012/06/01 | $115,000 |
| Jennifer Acosta | Junior Javascript Developer | Edinburgh | 43 | 2013/02/01 | $75,650 |
| Cara Stevens | Sales Assistant | New York | 46 | 2011/12/06 | $145,600 |
<table class="outlined"></table>
Column groups
A <colgroup> after the caption groups columns that belong together, such as the figures of one year. Nausikaä draws a line between the groups. A <col> inside a group stands for a single column; give it the class highlight to mark that column. Cells with a background of their own, such as the rows of a striped table, cover the highlight, so use it on basic and bordered tables.
| Branch | Books 2025 | Books 2026 | E-books 2025 | E-books 2026 |
|---|---|---|---|---|
| Harbour | 12,480 | 13,105 | 3,210 | 4,020 |
| Old town | 9,870 | 9,415 | 2,640 | 3,380 |
| Riverside | 7,320 | 7,960 | 1,950 | 2,510 |
<table>
<caption>...</caption>
<colgroup>
<col>
</colgroup>
<colgroup>
<col>
<col class="highlight">
</colgroup>
<thead>...</thead>
<tbody>...</tbody>
</table>
The highlight is for the eye only: screen readers don’t announce it. If the marked column matters, say why in the caption or in a heading cell, for example “Books 2026 (this year)”.