English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
<th> valign attribute usage, the valign attribute specifies the vertical alignment of the content within the table header cell., Online examples demonstrate how to use the <th> valign attribute, browser compatibility, syntax definition, and detailed information about its attribute values, etc.
Vertical alignment of content within the <th> element:
<table style="width:100%" border="1"> <tr> <th valign="bottom">Year</th> <th valign="bottom">Income</th> </tr> <tr> <td>2018</td> <td>$19320.00</td> </tr> </table>Test and see ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the valign attribute.
HTML5 The <th> valign attribute is not supported. Please use CSS instead.
The valign attribute specifies the vertical alignment of the content within the table header cell.
<th 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 a fictional 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. This value's effect 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 <th> tag