<table id="myTable" border="1"> <tbody><tr> <td colspan="4">cell 1</td> <td colspan="4">cell 2</td> </tr> <tr> <td>cell 3</td> <td>cell 4</td> <td>cell 5</td> <td>cell 6</td> <td>cell 7</td> <td>cell 8</td> <td>cell 9</td> <td>cell 10</td> </tr> </tbody></table> <form> <input type="button" onclick="setColSpan()" value="Change colspan"> </form>