Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.
The vAlign property of the HTMLTableColElement interface is a string indicating how to vertically align text in a table <col> column element.
Note: This property is deprecated, and CSS should be used to align text vertically in a column. Use the CSS vertical-align property, which takes precedence, to vertically align text in each column cell instead.
As <td> are not children of <col>, you can't set it directly on a <col> element, you need to select the cells of the column using a td:nth-child(n) or similar (n is the column number).
The possible values are: "top", "middle", "bottom", or "baseline"
topAlign the text to the top of the column. Use vertical-align: top instead.
centerVertically center the text in the column. Synonym of middle. Use vertical-align: middle instead.
middleVertically center the text in the column. Use vertical-align: middle instead.
bottomAlign the text to the bottom of the column. Use vertical-align: bottom instead.
baselineSimilar to top, but align the baseline of the text as close to the top so no part of the character is outside of the cell.
Use CSS vertical-align. As <td> elements of a column are not children of <col>, you can't set it directly on a <col>, you need to select the cells using a td:nth-child(n) or similar (n is the column number).
An example is available on the :nth-child() page.
| Specification |
|---|
| HTML> # dom-col-valign> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
vAlign |
1 | 12 | 1 | ≤12.1 | 3 | 18 | 4 | ≤12.1 | 1 | 1.0 | 4.4 | 1 |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableColElement/vAlign