Definition
HTML elements for presenting tabular data in rows and columns—<table>, <tr>, <th>, <td>—with grouping elements (thead, tbody, tfoot, colgroup) for structure and styling hooks.
Why It Matters
This provides a structured way to present relational data on the web, making it easy for users to compare information at a glance. While no longer used for layout, tables remain the superior tool for displaying dense, structured data like financial reports or technical specifications.
Core Concepts
<table>
<thead>
<tr>
<th>Name</th>
<th>Role</th>
</tr>
</thead>
<tbody>
<tr>
<td>Alice</td>
<td>Developer</td>
</tr>
<tr>
<td colspan="2">Total staff: 1</td>
</tr>
</tbody>
</table>
<table>: Container for all tabular data.<tr>: Table row.<th>: Header cell (column or row title).<td>: Data cell.colspan/rowspan: Span cells across multiple columns or rows.- Row Groups:
<thead>,<tbody>,<tfoot>for semantic sections. - Column Groups:
<colgroup>and<col>for column-wide styling.