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

HTML thead valign Attribute

HTML valign attribute

HTML thead Tag Reference HTML Tag

Example

Vertically center-align the content of the element:

 

   

     

     

   

 

   

     

     

   

   

     

     

   

Month Savings
January $100
February $80

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 the element.


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 thead Tag Reference HTML tag