Expand description
Attribute names for table cell (<td>, <th>) elements.
§Purpose
Table data (<td>) and header (<th>) cells can span multiple rows or
columns and be associated with headers for accessibility.
§Common Attributes
colspan: Number of columns the cell spansrowspan: Number of rows the cell spansheaders: Space-separated list of header cell IDsscope: Scope of header cell (row, col, rowgroup, colgroup)
§Example
<table>
<tr>
<th id="name" scope="col">Name</th>
<th id="age" scope="col">Age</th>
</tr>
<tr>
<td headers="name">Alice</td>
<td headers="age">30</td>
</tr>
<tr>
<td colspan="2">Merged cell across two columns</td>
</tr>
</table>