colgroup的用法

来源:互联网 发布:javascript小程序 编辑:程序博客网 时间:2024/06/01 12:20
**colgroup
<body><table border="2" width="100%"><colgroup span="2" align="left"><col width="100px"/>//第一列的宽度 把前两列合并</colgroup> //设置了两列的水平对齐是left    <colgroup style="color:red;" align="right"></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>  <tr>    <td>2489604</td>    <td>My first CSS</td>    <td>$47</td>  </tr></table></body>