Use lists for items that are:
- Part of a group (
<ul>).
- Sequential or ordered (
<ol>).
- Defined as a term and description (
<dl>).
Structure
Lists are a way to signal structure to assistive technology, not just visual design.
Lists are one of the easiest wins for semantic clarity - use any time content is grouped or sequential.
Table
Lunch order
| Item |
Quantity |
Price |
| Hamburger
| 2 |
$10.00 |
| Fries
| 1 |
$2.00 |
| Milkshake
| 1 |
$4.00 |
| Total |
$16.00 |
Use thead and tbody for structure. Optionally, tfoot.
Use th for headers with scope attributes.
Optionally, use a caption element to help give context.
Assistive Technology and Tables
Some screen readers allow table navigtation shortcuts when tables are coded correctly.
Scope attributes give context to the table cell data being read.