如需对全部列应用样式,<col> 标签很有用,这样就不需要对各个单元和各行重复应用样式了。 您只能在 table 或 colgroup 元素中使用 <col> 标签。 实例col 元素为表格中的三个列规定了不同的对齐方式: <table width="100%" border="1"> <col align="left" /> <col align="left" /> <col align="right" /> <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> 在 中,<col> 没有结束标签。 在 XHTML 中,<col> 标签必须被正确 |
|
来自: Doris琪2a3bd3i > 《编程实战手册》