"."/> ".">
Home >Web Front-end >HTML Tutorial >What attributes should be used to merge two cells in html?
html中合并两个单元格应该使用的属性是“colspan”,“colspan”属性定义单元格应该横跨的列数,其语法是“
<td colspan="number">”。
推荐:《HTML视频教程》
html中合并两个单元格应该使用的属性是“colspan”。
colspan 属性定义单元格应该横跨的列数。
语法
<td colspan="number">代码示例:
<table border="1"> <tr> <th>Month</th> <th>Savings</th> </tr> <tr> <td>January</td> <td>$100</td> </tr> <tr> <td>February</td> <td>$100</td> </tr> <tr> <td colspan="2">Sum: $180</td> </tr> </table>运行效果:
The above is the detailed content of What attributes should be used to merge two cells in html?. For more information, please follow other related articles on the PHP Chinese website!