YouTip LogoYouTip

Att Table Align

$(function () {\n // Code Block Copy Feature\n var clipboard = new ClipboardJS('.copy-btn');\n clipboard.on('success', function (e) {\n alert("Copy success!");\n e.clearSelection();\n });\n });\n \n\n
\n
\n
\n
\n \n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n

\n

\n

\n
\n

Example

\n

A right-aligned HTML table:

\n \n \n \n \n \n \n \n \n \n \n \n \n \n
MonthSavings
January$100
February$80
\n

Try it yourself Β»

\n
\n
\n

Browsers Support

\n

All major browsers support the align attribute.

\n
\n
\n

Definition and Usage

\n

HTML5 does not support the align attribute of the

tag. Use CSS instead.

\n

In HTML 4.01, the align attribute of the

tag is deprecated.

\n

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

\n

Usually, there will be a line break before and after an HTML table. By using the align attribute, you can achieve the effect of other HTML elements surrounding the table.

\n \n
\n

Compatibility Notes

\n

In HTML 4.01, the align attribute of the

tag is deprecated. Please use CSS instead.

\n

CSS Syntax:

\n

CSS Example: Table Alignment

\n

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

\n \n
\n

Syntax

\n

<table align="left|right|center">

\n
\n
\n

Attribute Values

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
ValueDescription
leftLeft-align the table.
rightRight-align the table.
centerCenter-align the table.
\n
\n
\n \n
\n
\n
\n
\n

\n
← Att Table BgcolorAtt Source Type β†’