Skip to content
Learn Netverks

Lesson

Step 27/31 87% through track

styled-data-tables

Accessible data tables + CSS

Last reviewed Jun 1, 2026 Content v20260601
Track mode
iframe_html
Means
HTML preview sandbox
Reading
~1 min
Level
intermediate

This lesson

This lesson teaches Accessible data tables + CSS—the ideas, syntax, and habits you need before moving on in HTML & CSS.

Without a solid grasp of Accessible data tables + CSS, you will repeat mistakes in HTML & CSS exercises and on real pages or scripts.

You will apply Accessible data tables + CSS in contexts like: Data tables in dashboards, pricing grids, and accessible tabular reports.

Read the lesson, edit HTML/CSS in the playground, press Run to preview, then answer the lesson MCQs.

Toward the end of the track—use it to consolidate patterns before the capstone or summary lessons.

Tables are for tabular data, not page layout. Good HTML (caption, th scope) plus CSS (zebra rows, sticky header) gives readable dashboards and interview credibility.

HTML baseline

  • <caption> — table title announced by screen readers.
  • <th scope="col|row"> — header relationships.
  • Avoid empty cells used only for spacing—use CSS padding.

CSS enhancements

  • border-collapse: collapse for tight grids.
  • Zebra: tbody tr:nth-child(even).
  • Responsive: wrap in .table-wrap { overflow-x: auto; } on small screens.

Challenge

Sticky table header

  1. Add position: sticky; top: 0 to thead th.
  2. Give header cells a solid background so rows do not show through while scrolling.

Done when: header row stays visible inside the scrollable table wrapper.

Go deeper — When NOT to use a table (intermediate / experienced)

Layout grids, marketing columns, and toolbars should use flex/grid. Misused tables break screen-reader table navigation and are harder to make responsive. If data is not row/column relationships, do not use <table>.

Interview tip Lesson completion confidence

Can you explain this lesson in 30 seconds without reading notes?

Not saved yet.

Playground

Runs in your browser in a sandboxed frame. Backend runners appear when this track’s profile allows them.

Check yourself

Multiple choice — immediate feedback.

Discussion

Past discussion is visible to everyone. Only logged-in users can post comments and replies.

Starter discussion topics

  • What part of this lesson needs a second read?
  • What would you try differently in a real project?

Sign up or log in to post comments and sync lesson progress across devices.

No discussion yet. Be the first to ask a question.

Jump