HTML <th> 標簽的 rowspan 屬性
定義和用法
rowspan 屬性規(guī)定表頭單元格可橫跨的行數(shù)。
實例
表格單元橫跨兩行的表格:
<table border="1">
<tr>
<th>Company</th>
<th>Address</th>
<th rowspan="3"
>All the companies in USA</th>
</tr>
<tr>
<td>Apple, Inc.</td>
<td>1 Infinite Loop Cupertino, CA 95014</td>
</tr>
<tr>
<td>Google, Inc.</td>
<td>1600 Amphitheatre Parkway Mountain View, CA 94043</td>
</tr>
</table>
瀏覽器支持
所以瀏覽器都支持 rowspan 屬性。
沒有瀏覽器支持 rowspan="0",這個值有特殊的意義。(參見屬性值表格中的描述)
語法
<th rowspan="value">
屬性值
值 | 描述 |
---|---|
number |
設(shè)置表頭單元格可橫跨的行數(shù)。 注釋:rowspan="0" 指示瀏覽器橫跨到表格部分的最后一行(thead、tbody 或者 tfoot)。 |