HTML <thead> valignProperty
Example
Vertically center-align the content in the <thead> element:
<table border="1"
width="100%">
<thead valign="middle">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
</thead>
<tr>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
</table>
<thead valign="middle">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
</thead>
<tr>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
</table>
Try it Yourself »
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the valign attribute.
Definition and Usage
HTML5 does not support the <thead> valign attribute. Please use CSS instead.
The valign attribute specifies the vertical alignment of the content in the <thead> element.
Syntax
<thead valign="top|middle|bottom|baseline">
Property value
| Value | Description |
|---|---|
| top | Top-align the content. |
| middle | Aligns the content to the center (default value). |
| bottom | Bottom-align the content. |
| baseline | Aligns with 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 row to share the same baseline. The effect of this value is often the same as the bottom value. However, if the text has different font sizes, the baseline effect is better. See the illustration below. |
When the font size of the text differs, bottom vs. baseline diagram:
valign="bottom"
valign="baseline"
HTML <thead> Tagother extensions