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

HTML col valign attribute

HTML valign attribute

HTML col Tag Reference HTML Tag

Example

A table with columns of different vertical alignments:

 

 

 

   

   

 

 

   

   

 

Month Savings
January $100

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Only Internet Explorer and Opera support the valign attribute. However, IE and Opera do not support the "baseline" value.


Definition and Usage

HTML5 no longer supports the valign attribute.

The align attribute specifies the vertical alignment of the content associated with 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 with 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:

valign="bottom"

valign="baseline"


HTML col Tag Reference HTML tag