$(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 - Home
\n - HTML
\n - table align Attribute
\n
\n
\n
\n
\n
\n
\n
\n
Example
\n
A right-aligned HTML table:
\n
\n \n | Month | \n Savings | \n
\n \n | January | \n $100 | \n
\n \n | February | \n $80 | \n
\n
\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 | Value | \n Description | \n
\n \n \n \n | left | \n Left-align the table. | \n
\n \n | right | \n Right-align the table. | \n
\n \n | center | \n Center-align the table. | \n
\n \n
\n
\n \n \n \n
\n \n\n