HTML <td> with headers Attribute

HTML <td> with headers Attribute

The headers attribute contains a list of space-separated strings, each corresponding to the id attribute of the <th> elements that apply to this element.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <table> <tr> <th id="students">Students</th> <th id="count">Count</th> </tr> <tr> <td headers="students">Male</td> <td headers="count">28</td> </tr> <tr> <td headers="students">Female</td> <td headers="count">30</td> </tr> </table> </body> </html>

Attribute Value

ValueExplanation
textSpecifies a list of space-separated strings, each corresponding to the id attribute of the <th> elements that apply to this element.

Reminder

Hi Developers, we almost covered 99.5% of HTML Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in HTML.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Meet the Author