CHAPTER 4 – Tables
Checking engine…

Chapter 4 — Tables

When data has two dimensions – rows and columns – a table is the correct tool. This chapter teaches you to build accessible, semantic grids for true relational data, and to avoid the old trap of using tables for visual layout.

What’s Inside This Chapter

  • Section 4.1 — Basic Table Elements
    The four pillars: <table>, <tr>, <td>, <th>. Adding a <caption> for context, and spanning cells with colspan and rowspan.
  • Section 4.2 — Structuring Tables Semantically
    Grouping rows into <thead>, <tbody>, and <tfoot>. Defining column tracks with <colgroup> and <col>. Binding headers to cells with scope, and handling complex multi‑tier headers with id and headers.
  • Section 4.3 — When to Use Tables
    The golden rule: tables are for relational data, never for visual layout. The linearization test, and the severe consequences of misusing <table> for positioning.
START READING

Turn to Section 4.1 to begin building your first grid.

Checking engine…