Interview Question

What are table rows and columns?

`<tr>` creates rows, while `<th>` and `<td>` cells create the table’s columns.

💡 Concept ✅ Quick Revision 🌐 HTML

Answer

A table row is created with `<tr>`, and its cells form the table columns. β€’ Header cells use `<th>` and data cells use `<td>`. β€’ Cells in the same position across rows form a visual column. β€’ Header relationships should be clear so assistive technology can understand the data.

💡 Simple Example

<table><caption>Attendance</caption><thead><tr><th scope="col">Student</th><th scope="col">Days</th></tr></thead><tbody><tr><td>Maya</td><td>20</td></tr></tbody></table>

⚡ Quick Revision

`<tr>` creates rows, while `<th>` and `<td>` cells create the table’s columns.