Tables are for tabular data — information that logically belongs in rows and columns, like schedules, comparison grids, or pricing tables.
<table>
<tr>
<td>Row 1, Cell 1</td>
<td>Row 1, Cell 2</td>
</tr>
<tr>
<td>Row 2, Cell 1</td>
<td>Row 2, Cell 2</td>
</tr>
</table>
| Tag | Meaning |
|---|---|
<table> | The table container |
<tr> | Table Row |
<td> | Table Data cell |
<th> | Table Header cell (bold + centred) |
<th><table>
<tr>
<th>Name</th>
<th>Age</th>
<th>City</th>
</tr>
<tr>
<td>Alice</td>
<td>28</td>
<td>London</td>
</tr>
</table>
Use scope="col" or scope="row" on <th> for accessibility.
<thead>, <tbody>, <tfoot><table>
<thead>
<tr><th>Item</th><th>Qty</th><th>Price</th></tr>
</thead>
<tbody>
<tr><td>Apple</td><td>3</td><td>$1.50</td></tr>
<tr><td>Bread</td><td>1</td><td>$2.00</td></tr>
</tbody>
<tfoot>
<tr><td colspan="2">Total</td><td>$3.50</td></tr>
</tfoot>
</table>
colspan="n" — cell spans n columnsrowspan="n" — cell spans n rows<table>
<tr>
<th colspan="3">Q1 Sales Report</th>
</tr>
<tr>
<td>January</td><td>February</td><td>March</td>
</tr>
</table>
Build a table showing a weekly class schedule with at least:
<table> element.<thead> row with <th> headers for each day (e.g., Monday–Friday).<tbody> with at least 2 rows of schedule data (use <td> cells).colspan to span multiple columns.A table needs at least three tags: <table>, <tr> (row), and <td> (cell).