0
0
HTMLmarkup~20 mins

Cell merging in HTML - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Cell Merging Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
rendering
intermediate
2:00remaining
What is the visual result of this table with merged cells?
Look at this HTML table code. What will you see in the browser?
HTML
<table border="1">
  <tr>
    <td rowspan="2">A</td>
    <td>B</td>
  </tr>
  <tr>
    <td>C</td>
  </tr>
</table>
AA and C merged horizontally in the first row, B in the second row.
BA in the first column spanning two rows, B and C stacked vertically in the second column.
CA and B in the first row, C in a new row but under A.
DA, B, and C all in one row horizontally.
Attempts:
2 left
💡 Hint
Remember, rowspan merges cells vertically.
rendering
intermediate
2:00remaining
What does colspan="3" do in this table?
Check this table code. What will the first row look like in the browser?
HTML
<table border="1">
  <tr>
    <td colspan="3">Header</td>
  </tr>
  <tr>
    <td>1</td>
    <td>2</td>
    <td>3</td>
  </tr>
</table>
AThe first row has three cells labeled 'Header', 'Header', 'Header'.
BThe first row has three separate cells labeled 'Header', '2', and '3'.
CThe first row has one cell spanning across three columns labeled 'Header'.
DThe first row has one cell labeled 'Header' but only spans one column.
Attempts:
2 left
💡 Hint
colspan merges cells horizontally.
📝 Syntax
advanced
2:00remaining
What error does this table code cause?
This HTML snippet tries to merge cells but has a mistake. What error or problem will happen?
HTML
<table border="1">
  <tr>
    <td colspan="2">X</td>
    <td>Y</td>
  </tr>
  <tr>
    <td>A</td>
    <td>B</td>
  </tr>
</table>
AThe second row has fewer cells than the first, causing layout issues.
BThe browser shows an extra empty cell in the second row.
CThe table renders normally with no visible error.
DThe browser throws a syntax error and does not render the table.
Attempts:
2 left
💡 Hint
Count columns in each row after merging.
accessibility
advanced
2:00remaining
Which attribute improves accessibility for merged table cells?
When merging cells in a table, which attribute helps screen readers understand the table structure better?
Aaria-colspan
Baria-rowspan
Ctabindex
Dscope
Attempts:
2 left
💡 Hint
This attribute defines the cell's role as header for rows or columns.
selector
expert
2:00remaining
Which CSS selector targets all cells merged horizontally with colspan?
You want to style all table cells that have a colspan attribute. Which CSS selector works?
Atd[colspan]
Btd.colspan
Ctd#colspan
Dtd::colspan
Attempts:
2 left
💡 Hint
Attribute selectors use square brackets.