Tables, Lists & Disclosure Widgets
Present structured tabular data accessibly with thead, scope, and caption, and build zero-JS accordions with details and summary.
What you'll learn
- Structure accessible data tables using <caption>, <thead>, <tbody>, and scope
- Choose between <ul>, <ol>, and <dl> description lists
- Create native, accessible accordions using <details> and <summary>
HTML provides purpose-built elements for structured data and collapsible FAQs, no JavaScript frameworks needed.
Accessible Data Tables
Use <table> strictly for tabular data (schedules, pricing comparisons, metrics), never for page layout.
Key accessibility ingredients:
<caption>: Acts like a title for the table.<thead>and<tbody>: Separate column headers from data rows.<th scope="col">/<th scope="row">: Explicitly links headers to their cells for screen readers.
Native Accordions with <details> & <summary>
Need an FAQ or collapsible hint? Native HTML <details> works with keyboard navigation and screen readers out of the box!
Try It Yourself
Click the FAQ items below and try adding a fourth course row to the table:
Check Your Understanding
1. Which HTML element provides a visible, accessible title for a <table>?
2. Which pair of HTML elements creates a native collapsible accordion with zero JavaScript?
Finished this lesson?
Your progress is saved locally in your browser, no account needed.