English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML 参考手册

HTML 标签大全

HTML: <tfoot> align 属性

align属性指定 <tfoot>元素内内容的水平对齐方式。IE无法正确处理表中的“ justify”值,IE会将内容居中。

 HTML <tfoot> tag

在线示例

将内容在<tfoot>元素内居中对齐:

<table style="width:100%;" border="1">
    <tr>
      <th>程序语言书籍</th>
      <th>价格</th>
    </tr>
    <tr>
      <td align="right">PHP基础教程</td>
      <td>段30</td>
    </tr>
    <tr>
      <td align="left">JAVA编程思想</td>
      <td>段80</td>
    </tr>
      <tfoot align="center">
      <tr>
        <td>总计</td>
        <td>段110</td>
      </tr>
  </tfoot> 
</table>
Test to see ‹/›

Browser compatibility

IEFirefoxOperaChromeSafari

All major browsers support the align attribute.

Note:IE cannot handle the "justify" value correctly; IE will process it as centered.

Note:Almost no browsers can correctly handle the "char" value.

Definition and usage

HTML5 The <tfoot> align attribute is not supported. Use CSS instead.

The align attribute specifies the horizontal alignment of the content within the <tfoot> element.

Syntax

<tfoot align="left|right|center|justify|char">

Attribute value

ValueDescription
leftLeft-align the content (default value).
rightRight-align the content.
centerCenter the content.
justifyStretch the line so that each line can have equal width (as in newspapers and magazines).
charAlign content to a specified character.
 HTML <tfoot> tag