天天看点

html中table里的col标签

<html>

<body>

<table border="2">

<col span="2" style="color:red">

<col style="color:blue">

<tr>

<td>红色</td>

<td>蓝色</td>

</tr>

</table>

</body>

</html>

这样就可以给每一列设置样式,而不用在每个td里面设置。

第一二两列是红的。第三列是蓝的。