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

HTML Reference Manual

HTML Tag Directory

HTML tbody valign attribute

The valign attribute specifies the vertical alignment of the content within the <tbody> element.

 HTML <tbody> tag

Online Example

Align the content within the <tbody> element vertically to the bottom:

<table border="1">
  <tr>
      <th>Programming Language Books</th>
      <th>Price</th>
  </tr>
  <tbody valign="bottom">
    <tr>
      <td>PHP Basic Tutorial</td>
      <td>$50</td>
    </tr>
    <tr>
      <td>Java Programming Thought</td>
      <td>$80</td>
    </tr>
  </tbody>
</table>
Test and see ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

All major browsers support the valign attribute.

Definition and Usage

HTML5 The valign attribute of <tbody> is not supported. Please use CSS instead.

The valign attribute specifies the vertical alignment of the content within the <tbody> element.

Syntax

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

Attribute Value

ValueDescription
topAlign content upward.
middleAlign content to the center (default value).
bottomAlign content downward.
baselineAlign content to the baseline. The baseline is a fictional line. In a line of text, most letters are based on the baseline. The baseline value sets all the table data in the line to share the same baseline. The effect of this value is often the same as the bottom value. However, if the text sizes are different, the baseline effect will be better. Please see the illustration below.

If the font sizes are different, bottom vs. baseline illustration:

valign="bottom"

valign="baseline"

 HTML <tbody> tag