HTML DOM TableHeader headers Property Last Updated : 24 Aug, 2022 Summarize Comments Improve Suggest changes Share Like Article Like Report The HTML DOM TableHeader headers property is used to set or return the value of the headers attribute. The header’s attribute is used to specify the table cell containing header information for the current header cell. Syntax It returns the header's property.tableheaderObject.headersIt is used to set the header's property.tableheaderObject.headers = header_ids Property Values: It contains the value i.e header_ids which specify the separated list of id’s to one or more header cell. Return Value: It returns a string value that represents the separated list of header-list id’s. Example 1: This example returns a header's property. HTML <!DOCTYPE html> <html> <head> <!-- style to set border --> <style> table { border: 2px solid black; } td { border: 1px dotted green; } </style> </head> <body> <h2>GeeksforGeeks</h2> <b>DOM TableHeader headers property</b> <table> <tr> <th id="tableHeaderID" headers="username"> Username </th> </tr> <tr> <td>Sachin</td> <td>Suraj</td> <td>Gauri</td> </tr> </table> <br> <button onclick="getHeader()"> Click to get table header </button> <p id="paraID" style="font-size:20px;color:green"> </p> <!-- Script to return TableHeader headers Property --> <script> function getHeader() { var tab = document.getElementById("tableHeaderID").headers; document.getElementById("paraID").innerHTML = tab; } </script> </body> </html> Output: Example 2: Below code demonstrates the setting of the header's property. HTML <!DOCTYPE html> <html> <head> <!-- style to set border --> <style> table { border: 2px solid black; } td { border: 1px dotted green; } </style> </head> <body> <h2>GeeksforGeeks</h2> <b>DOM TableHeader headers property</b> <table> <tr> <th id="tableHeaderID" headers="username"> Username </th> </tr> <tr> <td>Sachin</td> <td>Suraj</td> <td>Gauri</td> </tr> </table> <br> <button onclick="getHeader()"> Click to get table header value </button> <p id="paraID" style="font-size:18px;color:green"> </p> <!-- Script to set the TableHeader headers Property --> <script> function getHeader() { var tab = document.getElementById( "tableHeaderID").headers = "user_firstname"; document.getElementById("paraID").innerHTML = "The value of the headers attribute was changed to: " + tab; } </script> </body> </html> Output: Supported Browsers: Google ChromeFirefoxOperaSafariInternet Explorer/Edge Comment More infoAdvertise with us Next Article HTML DOM TableHeader headers Property M manaschhabra2 Follow Improve Article Tags : Web Technologies HTML HTML-DOM HTML-Property Similar Reads HTML DOM TableData headers Property The HTML | DOM TableData headers Property sets or return the value of a headers attribute. The headers attribute is used to specify the table cell containing Header information for the current data cell. Syntax: // To get the header's property. let hadersProperty = tabledataObject.headers;// To set 2 min read HTML DOM Table Header vAlign Property The HTML DOM TableHeader vAlign property is used to set or return the value of the vAlign attribute of the <th> element. The vAlign attribute is used to specify the vertical alignment of the text-content inside the Table Header. Note: This property is no longer supported in HTML5. Syntax: It r 2 min read HTML | DOM TableHeader abbr Property The DOM TableHeader abbr Property is used to sets or returns the value of the abbr attribute. The abbr attribute is used to specify the shorter version of the content in a header cell. It has no visual effect on the ordinary web browser and can be used by screen readers. Syntax: It returns the abbr 2 min read HTML | DOM Table tHead Property The Table tHead property is used for returning a reference to the <thead> element of a table. The <thead> element is used for grouping the header content in an HTML table. It returns NULL if the <thead> element is not defined.Syntax tableObject.tHeadReturn Value : A reference to th 1 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 Like