HTML slt;tbody sgt; align property

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

The align property of the label specifies how the contents in the table body are aligned horizontally, as shown in the following example:

Align to the right what's in the element:

<table border="1" width="100%">
<thead>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
</thead>
<tbody align="right">
<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 align attribute HTML tbody align attribute HTML tbody align attribute HTML tbody align attribute HTML tbody align attribute

The align property is supported by all major browsers.

Note: IE does not handle the "justify" value correctly, and IE processes it in a centered manner.

Note: Few browsers handle the "char" value correctly.


Definitions and usages

HTML5 does not support the .lt;tbody-align property. Use CSS instead.

The align property specifies the horizontal alignment of the contents in the element.


Grammar

<tbody align="left|right|center|justify|char">

The property value

value describe
left Left alignment content (the default value of the table data).
right Right alignment.
center Come align the content (the default value of TH element).
justify Stretching the line so that each row can have equal width (just like in newspapers and magazines).
char Align the contents of the specified character.


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