实例
下面的 HTML 表格中包含一个横跨三行的表头单元格:
<table border="1"> <tr> <th>Month</th> <th>Savings</th> <th rowspan="3">Savings for holiday!</th> </tr> <tr> <td>January</td> <td>$100</td> </tr> <tr> <td>February</td> <td>$80</td> </tr></table>
知识兔 »
(更多实例见页面底部)
知识兔 »
(更多实例见页面底部)
浏览器支持
属性 | |||||
---|---|---|---|---|---|
rowspan | Yes | Yes | Yes | Yes | Yes |
注意:只有 Firefox 和 Opera 支持 rowspan="0",该值有特殊的含义(请看下面的"属性值"表格)。
定义和用法
rowspan 属性定义表头单元格应该横跨的行数。
HTML 4.01 与 HTML5之间的差异
无。
语法
<th rowspan="number">
属性值
值 | 描述 |
---|---|
number | 规定表头单元格应该横跨的行数。注意: rowspan="0" 告知浏览器使单元格横跨到表格组件中的最后一个行(thead、tbody 或 tfoot)。 |

更多实例
rowspan="0" 的使用
该实例只适用于 Firefox 和 Opera 浏览器,实例演示了 rowspan="0" 的使用。
