我有下表:
<table border="1"> <tr> <th scope="col">Header</th> <th scope="col">Header</th> <th scope="col">Header</th> </tr> <tr> <th scope="row"> </th> <td> </td> <td>Split this one into two columns</td> </tr> </table>
而且我希望将包含“将其分成两列”的单元格拆分成两个单元格/列。我该怎么做?
解决方法
像这个
http://jsfiddle.net/8ha9e/1/
将colspan =“2”添加到第三个<然后在您的第二行有4 td。
<table border="1"> <tr> <th scope="col">Header</th> <th scope="col">Header</th> <th scope="col" colspan="2">Header</th> </tr> <tr> <th scope="row"> </th> <td> </td> <!-- The following two cells will appear under the same header --> <td>Col 1</td> <td>Col 2</td> </tr> </table>