Easy Tutorial
❮ Av Prop Currenttime Att Th Char ❯

HTML <table> align Attribute

HTML <table> Tag

Example

A right-aligned HTML table:


Browser Support

All major browsers support the align attribute.


Definition and Usage

In HTML 4.01, the align attribute of <table> is deprecated.

The align attribute specifies the alignment of the table relative to the surrounding text.

Typically, HTML tables are preceded and followed by line breaks. By using the align attribute, you can achieve the effect of other HTML elements wrapping around the table.


Compatibility Notes

In HTML 4.01, the align attribute of <table> is deprecated. Use CSS instead.

CSS syntax: <table style="float:right">

CSS Example: Table Alignment

In our CSS tutorial, you can find more details about the float property.


Syntax

Attribute Values

Value Description
left Aligns the table to the left.
right Aligns the table to the right.
center Centers the table.
❮ Av Prop Currenttime Att Th Char ❯