HTML <tbody> Attributres

HTML <tbody> align Attribute

Right-align the content inside the <tbody> element:

<table>
<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 Yourself »


Definition and Usage

The align attribute specifies the horizontal alignment of the content inside the <tbody> element.


HTML <tbody> char Attribute

Align the content inside the <tbody> element to the “.” character:

<table>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tbody align=”char” char=”.”>
<tr>
<td>January</td>
<td>$100.00</td>
</tr>
<tr>
<td>February</td>
<td>$80.00</td>
</tr>
</tbody>
</table>

Try it Yourself »


Definition and Usage

The <tbody> char attribute is not supported in HTML5.

The char attribute specifies the alignment of the content inside the <tbody> element to a character.

The char attribute can only be used if the align attribute is set to “char”.

The default value of char is the decimal-point character of the current language.


HTML <tbody> charoff Attribute

Align the content inside the <tbody> element two characters to the right from the “.” character:

<table>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tbody align=”char” char=”.” charoff=”2″>
<tr>
<td>January</td>
<td>$100.00</td>
</tr>
<tr>
<td>February</td>
<td>$80.00</td>
</tr>
</tbody>
</table>

Try it Yourself »


Definition and Usage

The <tbody> charoff attribute is not supported in HTML5.

The charoff attribute sets the number of characters the content inside the <tbody> element will be aligned from the character specified by the char attribute.

The charoff attribute can only be used if the char attribute is specified and the align attribute is set to “char”.


HTML <tbody> valign Attribute

Vertical align the content inside the <tbody> element to the bottom:

<table>
<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 Yourself »


Definition and Usage

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