align
HTML <col> align 属性
<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>
定义和用法
注意
HTML5 不支持 <col> align 属性。
align 属性规定与 col 元素相关的内容的水平对齐方式。
语法
<col align="left|right|center|justify|char">
属性值
值 | 描述 |
---|---|
left | 左对齐内容(默认值)。 |
right | 右对齐内容。 |
center | 居中对齐内容(<th> 元素的默认值)。 |
justify | 对行进行伸展,这样每行都可以有相等的长度(就像在报纸和杂志中)。 |
char | 将内容对准指定字符。 |
浏览器兼容性
align |
---|