HTML tbody valign Attribute
Definition and Usage
The valign attribute specifies the vertical alignment of the content within a <tbody> element.
Note: The valign attribute is not supported in HTML5. Use CSS instead.
Syntax
<tbody valign="top|middle|bottom|baseline">
Attribute Values
| Value | Description |
|---|---|
| top | Aligns the content to the top. |
| middle | Aligns the content in the middle (default). |
| bottom | Aligns the content to the bottom. |
| baseline | Aligns the content to the baseline. The baseline is an imaginary line. In a line of text, most letters are positioned with the baseline. The baseline value sets all the table cells in the line to share the same baseline. This value often has the same effect as the bottom value. However, if the text has different font sizes, the baseline value will have a better effect. See the illustration below. |
Example
Align the content of the <tbody> element to the bottom:
| Month | Savings |
|---|---|
| January | $100 |
| February | $80 |
Browser Support
The valign attribute is supported in all major browsers.
Illustration: bottom vs. baseline when text has different font sizes
valign="bottom"
valign="baseline"
YouTip