Loading

Quipoin Menu

Learn • Practice • Grow

html / Tables
interview

Q1. What HTML tags are used to create a table?
Main tags: <table> (container), <tr> (table row), <th> (header cell), <td> (data cell). Optional: <thead>, <tbody>, <tfoot>.

Q2. What is the difference between <th> and <td>?
<th> defines header cells, usually bold and centered by default. <td> defines standard data cells.

Q3. How do you merge cells in an HTML table?
Use colspan="number" to merge columns, and rowspan="number" to merge rows in <td> or <th> tags.

Q4. What is the purpose of the caption tag in tables?
The <caption> tag defines a table title or description, displayed above the table by default.

Q5. How can you style table borders with CSS?
Use border property on table, th, td. border-collapse: collapse merges borders into single lines.