You are here: Reference > HTML > attributes > vAlign (col, tbody, td, tr, ...)

vAlign attribute (col, tbody, td, tr, ...)

Browser support:
Specifies the vertical alignment of the text within an object.
You can use the vertical-align style property instead.
JavaScript page for this attribute: vAlign. You can find other example(s) there.

Possible values:

String that sets the vertical alignment.
One of the following values:
baseline
Base line of the first line of text is aligned with the base lines in adjacent objects.
bottom
Text is aligned to the bottom of the object.
center
Text is aligned to the middle of the object. Same as middle.
middle
Default. Text is aligned to the middle of the object. Same as center.
top
Text is aligned to the top of the object.
Default: middle.

Example HTML code 1:

This example illustrates the use of the vAlign attribute:
<table border="1px">
    <tr height="100">
        <td valign="top">Apple</td>
        <td valign="middle">Pear</td>
        <td valign="bottom">Peach</td>
        <td id="tdToChange">Change this text's vertical position!</td>
    </tr>
</table>
Did you find this example helpful? yes no

Supported by tags:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content