td/th vAlign property
td/th object
Definition and Usage
The vAlign property sets or returns the vertical alignment of the data within the cell.
Syntax
Set the vAlign property:
tdObject.vAlign="baseline|bottom|middle|top"
or
thObject.vAlign="baseline|bottom|middle|top"
Return the vAlign property:
tdObject.vAlign
or
thObject.vAlign
| Value | Description |
|---|---|
| baseline | Align with the baseline. |
| bottom | Align the content to the bottom. |
| middle | Center-align the content. |
| top | Align the content to the top. |
Browser support





All major browsers support the vAlign property
Example
Example
The following example changes the vertical alignment of the data within the cell:
| Firstname | Lastname | Text |
|---|---|---|
| Peter | Griffin | Hello, my name is Peter, I need a long text to demonstrate, I need a long text to demonstrate. |
Try it »
td/th object