English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
<tfoot> The valign attribute specifies the vertical alignment of the content within the <tfoot> element.
Align the content of the <tfoot> element vertically to the bottom:
<table style="width:100%;" border="1"> <tr> <th>Programming Language Books</th> <th>Price</th> </tr> <tr> <td align="right">PHP Basic Tutorial</td> <td>$30</td> </tr> <tr> <td align="left">Java Programming Thoughts</td> <td>$80</td> </tr> <tfoot valign="bottom"> <tr> <td>Total</td> <td>$110.00</td> </tr> </tfoot> </table>Test and see ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the valign attribute.
HTML5 The valign attribute of <tfoot> is not supported. Please use CSS instead.
The valign attribute specifies the vertical alignment of the content within the <tfoot> element.
<tfoot valign="top|middle|bottom|baseline">
Value | Description |
---|---|
top | Align content upward. |
middle | Align content to the center (default value). |
bottom | Align content downward. |
baseline | Align content to the baseline. The baseline is an imaginary line. In a line of text, most letters are based on the baseline. The baseline value sets all table data in a line to share the same baseline. The effect of this value is often the same as the bottom value. However, if the text sizes are different, the baseline effect is better. Please see the illustration below. |
Illustration of bottom vs. baseline when text sizes are different:
valign="bottom"
valign="baseline"
HTML <tfoot> tag