Table可控制样式和Css
Rowspan
Colspan
<table>
<colgroup>
<col />
<col class="alternate" />
<col />
</colgroup>
<tr>
<td>This</td>
<td>That</td>
<td>The other</td>
</tr>
<tr>
<td>Ladybird</td>
<td>Locust</td>
<td>Lunch</td>
</tr>
</table>
这样赋予alternate的样式将应用在每一行的第二列
<colgroup span="2"></colgroup>
在colgroup或者col上使用span属性,跟rowspan和colspan有相似的用途
colgroup一起使用可以定义属于列组的行数,比如<colgroup span="2"></colgroup>会组合头两列。当在colgroup使用span时,不应该再使用col标签。
在col里使用span是更明智的
总是为表格应用摘要和说明。
<table summary="The mating habits of locust, showing how many use protection and how many have a cigarette afterwards">
<caption>Locust mating habits</caption>
                    
                
                
            
        
浙公网安备 33010602011771号