Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM td/th vAlign property

td/th vAlign property

td/th Object Reference 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

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the vAlign property


Example

Example

The following example changes the vertical alignment of the data within the cell:

Runoob Tutorial(runoob.com)

    

        

        

        

    

    

        

        

        

    

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 Reference td/th object