A plain table with thead, tbody, and th scope attributes is enough—Pico zebra-stripes rows, aligns numerics sensibly, and keeps borders subtle. No table table-striped boilerplate required.
Table hygiene
- Put headers in
theadwithscope="col"onth - Use
captionwhen the table needs a visible title for screen readers - Responsive overflow — wrap wide tables if horizontal scroll is needed (custom CSS or a narrow column layout)
Data-heavy apps may still need custom grid layouts; Pico covers readable documentation tables, not spreadsheet-grade widgets.
Important interview questions and answers
- Q: Why prefer
thover styledtdin the first row?
A:thexposes header semantics to assistive tech; Pico styles both but semantics matter for accessibility. - Q: Does Pico replace DataTables or AG Grid?
A: No. It styles static semantic tables—sorting, virtualization, and editing need application-level libraries.
Self-check
- What is the smallest valid semantic table structure Pico can style?
- When should you add a
caption?