表格
文档分值:9
html >>> html >>> 表格
课程目录
<colgroup>
<colgroup> 和 <col> 标签为表格中的三个列设置了背景色:
<col>
<table border="1"> <colgroup> <col span="2" style="background-color:red"> <col style="background-color:yellow"> </colgroup> <tr> <th>ISBN</th> <th>Title</th> <th>Price</th> </tr> <tr> <td>3476896</td> <td>My first HTML</td> <td>$53</td> </tr> </table>
尝试一下
通过<colgroup>标签可以系统化的向整个列应用样式,从而不需要反复的对每一个单元格或者一行进行操作。
<table>
<caption>
<thead>
<tbody>
<tfoot>
<tr>
[ 该条目创建时间:2016-06-27 09:33:56 ]