<col>标签 align属性设置col元素相关的内容的水平对齐方式。HTML5已不支持该属性。暂无浏览器支持该属性。
<table width="100%" border="1"> <col align="left"> <col align="left"> <col align="center"> <col align="right"> <tr> <th>教程课程</th> <th>学习天数</th> <th>学习难度</th> <th>学习费用</th> </tr> <tr> <th>php</th> <th>7天</th> <th>中等</th> <th>免费</th> </tr> <tr> <th>HTML</th> <th>6天</th> <th>简单</th> <th>免费</th> </tr> </table>
<col align="对齐属性值">
值 | 描述 |
---|---|
left | 左对齐内容(默认值)。 |
right | 右对齐内容。 |
center | 居中对齐内容(th 元素的默认值)。 |
justify | 对行进行伸展,这样每行都可以有相等的长度(就像在报纸和杂志中)。 |
char | 将内容对准指定字符。 |