Easy Tutorial
❮ Att Object Align Av Prop Volume ❯

HTML <td> valign Attribute

HTML <td> Tag

Example

HTML table with cells aligned vertically in different ways:


Browser Support

All major browsers support the valign attribute.


Definition and Usage

The valign attribute specifies the vertical alignment of the content within a cell.


Syntax

Attribute Values

Value Description
top Aligns the content at the top.
middle Centers the content vertically (default value).
bottom Aligns the content at the bottom.
baseline Aligns to the baseline. The baseline is an imaginary line. In a line of text, most letters rest on the baseline. The baseline value sets all table data in the row to share the same baseline. This often has the same effect as the bottom value. However, if the text size varies, baseline works better. See the diagram below.

Diagram of bottom vs. baseline when text size varies:

❮ Att Object Align Av Prop Volume ❯