Easy Tutorial
❮ Tag Wbr Att Area Hreflang ❯

HTML <th> valign Attribute

HTML <th> Tag

Example

HTML table with header cells aligned vertically differently:


Browser Support

All major browsers support the valign attribute.


Definition and Usage

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


Syntax

Attribute Values

Value Description
top Aligns the content at the top.
middle Centers the content (default).
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 looks the same 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:

❮ Tag Wbr Att Area Hreflang ❯