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

HTML tr valign Attribute

HTML valign attribute

HTML tr Tag Reference HTML Tag

Example

An HTML table with rows of different vertical alignments:

 

   

   

 

 

   

   

 

Month Savings
January $100

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the valign attribute.


Definition and Usage

HTML5 does not support the valign attribute. Please use CSS instead.

The valign attribute specifies the vertical alignment of the content in a table row.


Syntax

Attribute values

Value Description
top Align the content to the top.
middle Center-align the content (default).
bottom Align the content to the bottom.
baseline Align to the baseline. The baseline is an imaginary line. In a line of text, most letters sit on the baseline. The baseline value sets all table data in the row to share the same baseline. The effect of this value is often the same as the bottom value. However, if the text sizes vary, the baseline value works better. See the illustration below.

Illustration of bottom vs. baseline when text sizes differ:

valign="bottom"

valign="baseline"


HTML tr Tag Reference HTML tag