English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The valign attribute specifies the vertical alignment of the content within the <thead> element. HTML5 The valign attribute for <thead> is not supported. Please use CSS instead.
Align the content of the <thead> element vertically to the bottom:
<table style="width:100%;" border="1"> <thead valign="bottom"> <tr> <th height="50">Babi Doll Manufacturer</th> <th height="50">Babi Doll Type</th> </tr> </thead> <tr> <td>Barbie Princess</td> <td>6Joint Barbie Doll</td> </tr> <tr> <td>Barbie Princess</td> <td>12Joint Barbie Doll</td> </tr> </table>Test and see ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the valign attribute.
HTML5 The valign attribute for <thead> is not supported. Please use CSS instead.
The valign attribute specifies the vertical alignment of the content within the <thead> element.
<thead valign="top|middle|bottom|baseline">
Value | Description |
---|---|
top | Aligns content upward. |
middle | Aligns content to the center (default value). |
bottom | Aligns content downward. |
baseline | Aligns 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 the 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 <thead> tag