HTML valign attribute
valign
The purpose of the HTML valign attribute is to define the vertical alignment of the content of a table cell.
Supported elements
HTML valign attribute supports col, colgroup, tbody, td, tfoot, th, thead, tr elements.
Syntax
<ElementName valign="value" >.....</ElementName>
Where ElementName is any supported element.
Type of value
Predefined.
Default value
Value | Description |
---|---|
top | Sets the vertical alignment of cell content top. |
middle | Sets the vertical alignment of cell content center. |
bottom | Sets the vertical alignment of cell content bottom. |
baseline | If set, the first text line occurs on a baseline common to all cells in the row. |
Supported doctypes
HTML 4.01 strict, HTML 4.01 transitional, HTML 4.01 frameset.
Example of HTML valign attribute
Result

View this example in a separate browser window
Example of HTML valign attribute
Previous: HTML usemap attribute
Next: HTML value attribute
Test your Programming skills with w3resource's quiz.