<th> is a header cell (bold and centred by default).
<td> is a data cell.
<caption> gives the table a title.
Spanning cells
colspan="2" makes a cell span two columns; rowspan="2" makes it span two rows.
Groups
<thead>, <tbody> and <tfoot> group the header, body and footer rows.
💡 Key Takeaways: HTML Tables
Mastering HTML Tables helps you write clean and reliable HTML code. Follow standard conventions, test edge cases, and keep logic simple. Try running the code example below and complete the exercises to build confidence.