向左对齐表头单元格中的内容:
<table width="100%" border="1"> <tr> <th align="left">Month</th> <th align="left">Savings</th> </tr> <tr> <td>January</td> <td>$100</td> </tr> </table>尝试一下 »
![]()
![]()
![]()
![]()
![]()
所有主流浏览器都支持 align 属性。
注意:几乎没有浏览器能够正确地处理 "char" 值。
HTML5 不支持 <th> align 属性。请使用 CSS 代替。
align 属性规定表头单元格中内容的水平对齐方式。
<th align="left|right|center|justify|char">
| 值 | 描述 |
|---|---|
| left | 左对齐内容。 |
| right | 右对齐内容。 |
| center | 居中对齐内容(<th> 的默认值)。 |
| justify | 对行进行伸展,这样每行都可以有相等的宽度(就像在报纸和杂志中)。 |
| char | 将内容对准指定字符。 |
HTML <th> 标签 在线实例
字符集 & 工具
最新更新
站点信息