![]() |
VOOZH | about |
The HTML <table> align Attribute specify the table's alignment but CSS properties like margin and text-align are preferred for table alignment. To align content within table rows or cells, use the align attribute within <tr> and <td> tag or apply CSS styles.
<table align="left | right | center">Attributes | Descriptions |
|---|---|
left | It sets the left align to the table. It is a default value. |
right | It sets the right align to the table. |
center | It sets the center align to the table. |
Example 1: In this example, we will see the implementation of the align-right attribute with an example.
Output:
👁 outputExample 2: In this example, we will see the implementation of the align-left attribute.
Output:
👁 outputExample 3: In this example, we will see the implementation of the align-center attribute.
Output:
👁 output| Attribute | 👁 Chrome | 👁 Edge | 👁 Firefox | 👁 Safari | 👁 Opera |
|---|---|---|---|---|---|
| Hyperlinks | Yes | Yes | Yes | Yes | Yes |
Note: The align attribute of <table> is not supported in HTML5. Use CSS instead. CSS Syntax: <table style="float:right">
HTML is the foundation of webpages, is used for webpage development by structuring websites and web apps. You can learn HTML from the ground up by following this HTML Tutorial and HTML Examples.