Recall & Review
beginner
What does
colspan attribute do in an HTML table?The
colspan attribute makes a table cell span across multiple columns, merging those cells horizontally into one.Click to reveal answer
beginner
What is the purpose of the
rowspan attribute in HTML tables?The
rowspan attribute makes a table cell span across multiple rows, merging those cells vertically into one.Click to reveal answer
beginner
How do you merge a cell across 3 columns in an HTML table?
Add
colspan="3" inside the <td> or <th> tag to merge that cell across 3 columns.Click to reveal answer
intermediate
Can you merge cells both horizontally and vertically in the same table?
Yes, you can use
colspan to merge cells horizontally and rowspan to merge cells vertically in the same table.Click to reveal answer
intermediate
What happens if you use
colspan or rowspan incorrectly in a table?The table layout may break or look uneven because the browser tries to fit merged cells but the total columns or rows don't match properly.
Click to reveal answer
Which attribute merges cells horizontally in an HTML table?
✗ Incorrect
colspan merges cells horizontally by spanning columns.How do you merge a cell vertically across 2 rows?
✗ Incorrect
rowspan="2" merges the cell vertically across 2 rows.What tag do you add
colspan or rowspan to?✗ Incorrect
You add
colspan or rowspan to table cells: <td> or <th>.If a cell has
colspan="3", how many columns does it cover?✗ Incorrect
The cell covers 3 columns horizontally.
What might happen if you use
rowspan incorrectly?✗ Incorrect
Incorrect use of
rowspan can break the table layout or make it look uneven.Explain how to merge cells horizontally and vertically in an HTML table.
Think about how columns and rows can be combined using attributes.
You got /4 concepts.
Describe common mistakes when using cell merging in tables and how they affect the table display.
Consider what happens if merged cells don't fit the table structure.
You got /4 concepts.