English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

Complete List of HTML Tags

HTML: <col> valign attribute

The valign attribute specifies the vertical alignment of the content related to the <col> element, online examples demonstrate how to use the HTML col valign attribute, browser compatibility, syntax definition, and detailed information about its attribute values, etc.

 HTML <col> tag

Online Example

HTML table with different vertically aligned columns:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>HTML <col> valign attribute usage-<title>Basic Tutorial(oldtoolbag.com)</title>
<style>table, th, td { border: 1px solid black;/style>
</head>
<body>
<table style="height:200px">
  <col>
  <col valign="bottom">
  <tr>
    <th>Month</th>
    <th>Savings</th>
  </tr>
  <tr>
    <td>January</td>
    <td>$100</td>
  </tr>
</table>
</body>
</html>
Test and see ‹/›

Browser compatibility

IEFirefoxOperaChromeSafari

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

Definition and Usage

HTML5 The <col> valign attribute is no longer supported.

The align attribute specifies the vertical alignment of the content related to the <col> element.

Syntax

<col valign="top|middle|bottom|baseline">

Attribute Value

ValueDescription
topAlign the content upward.
middleAlign the content to the center (default value).
bottomAlign the content downward.
baselineAlign with the baseline.

The baseline is an imaginary line. In a line of text, most letters are based on the baseline. The baseline value sets all table data in a line to share the same baseline. The effect of this value is often the same as the bottom value. However, if the text size is different, the baseline effect is better. Please see the following illustration:

valign="bottom"

valign="baseline"

 HTML <col> tag