HTML and tbody and valign properties

HTML tbody valign attribute HTML slt;tbody.gt; tags

The valign property specifies how the contents in a cell are arranged vertically, see the following example:

Align the contents of the element vertically to the bottom:

<table border="1" width="100%">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tbody valign="bottom">
<tr>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
</tbody>
</table>

Try it out . . .

Browser support

HTML tbody valign attribute HTML tbody valign attribute HTML tbody valign attribute HTML tbody valign attribute HTML tbody valign attribute

The valign property is supported by all major browsers.


Definitions and usages

HTML5 does not support the property of slt;tbody and valign. Use CSS instead.

The valign property specifies the vertical alignment of the contents of the element.


Grammar

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

The property value

value describe
top Content is aligned.
middle The content is aligned (default).
bottom During the content is aligned.
baseline Align with baseline.The baseline is a fictional line.In a line of text, most letters are based on baseline.Baseline Value Set All Table Data in the Row share the same baseline.The effect of this value is often the same as the Bottom value.However, if the font size of the text is different, then the effect of Baseline will be better.Please see the illustration below.

When the size of the text is different, the bottom vs. baseline illustration:

HTML tbody valign attribute valign="bottom"

HTML tbody valign attribute valign="baseline"


HTML tbody valign attribute HTML slt;tbody.gt; tags