HTML | DOM TableRow align Property Last Updated : 25 Feb, 2022 Summarize Comments Improve Suggest changes Share Like Article Like Report The HTML DOM TableRow align Property is used to set or return the horizontal alignment of the content within the table row. It is not supported by HTML 5. Syntax: It returns the align property. TableRowobject.align It sets the align property. TableRowObject.align = "left | right | center | justify | char" Property Values: left: It sets the left-align to TableRow. center: It sets the center-align to TableRow. It is the default value. right: It sets the right-align to TableRow. justify: It stretches the text of paragraph to set the width of all lines equal. char: It sets the text-align to a specific character. Return Values: It returns a string value which represents the alignment of the TableRow element. Example 1: This example sets the TableRow align Property. html <!DOCTYPE html> <html> <head> <style> table, th, td { border: 1px solid green; } </style> </head> <body> <h1> GeeksForGeeks </h1> <h2>HTML DOM tableRow align Property</h2> <table> <tr id = "GFG" align = "left"> <td>Geeks</td> <td>Geeks</td> <td>For</td> <td>Geeks</td> </tr> </table> <button onclick = "myGeeks()"> Click Here! </button> <p id ="sudo"></p> <script> function myGeeks() { var row = document.getElementById("GFG").align; document.getElementById("sudo").innerHTML = row; } </script> </body> </html> Output: Before Clicking On Button: After Clicking On Button: Example 2: html <!DOCTYPE html> <html> <head> <style> table, th, td { border: 1px solid green; } </style> </head> <body> <h1> GeeksForGeeks </h1> <h2>HTML DOM tableRow align Property</h2> <table> <tr id = "GFG" align = "left"> <td>Geeks</td> <td>Geeks</td> <td>For</td> <td>Geeks</td> </tr> </table> <button onclick = "myGeeks()"> Click Here! </button> <p id ="sudo"></p> <script> function myGeeks() { var row = document.getElementById("GFG").align = "right"; document.getElementById("sudo").innerHTML = "The value was changed to " + row; } </script> </body> </html> Output: Before Clicking On Button: After Clicking On Button: Supported Browsers: The browsers supported by DOM TableRow align Property are listed below: Google Chrome Internet Explorer Firefox Apple Safari Opera Comment More infoAdvertise with us Next Article HTML | DOM TableRow align Property M manaschhabra2 Follow Improve Article Tags : Web Technologies HTML HTML-DOM Similar Reads HTML DOM TableData align Property The HTML DOM TableData align property is used to set or return the horizontal alignment of the content within the table cell. It is not supported by HTML5. Syntax: It returns the align property.TableDataobject.alignIt sets the align property.TableDataObject.align = "left | right | center | justify | 2 min read HTML DOM TBody align Property The HTML DOM TBody align property is used to set or return the horizontal alignment of the content within the <tbody> element. It is not supported by HTML5. Syntax: It returns the align property. tbodyobject.align It sets the align property. tbodyObject.align = "left | right | center | justify 2 min read HTML DOM Table Header align Property The HTML DOM TableHeader align property is used to set or return the horizontal alignment of the content inside the table header. Â It is not supported by HTML 5. Syntax: It returns the align property.TableHeaderobject.alignIt sets the align property.TableHeaderObject.align = "left|right|center|justi 2 min read HTML DOM THead align Property The HTML DOM THead align property is used to set or return the horizontal alignment of the content within the <thead> element. It is not supported by HTML 5. Syntax: It returns the align property. theadobject.align It sets the align property. theadObject.align = "left | right | center | justif 2 min read HTML DOM TFoot align Property The HTML DOM TFoot align Property is used to set or return the horizontal alignment of the content within the <thead> element. It is not supported by HTML 5. Syntax: tfootObject.align = "left | right | center | justify | char" Property Values left: It sets the text left-align.right: It sets th 2 min read Like