Skip to main content
Merged Cells
Jonathon Fruchte avatar
Written by Jonathon Fruchte
Updated over 7 years ago

To merge cells, set colspan and rowspan attributes on <td> elements:

<table>
  <tr>
    <td colspan="2">Foo</td>
  </tr>
  <tr>
    <td rowspan="2">Bar</td>
    <td>Baz</td>
  </tr>
  <tr>
    <td>foobar</td>
  </tr>
</table>

This results in:

Did this answer your question?