HTML | headers attribute
The HTML headers attribute specifies one or additional header cells a table cell is expounded to.
Applies to:
Attribute Values: It contains the value i.e header_id which specify the space to the separated list of id’s to one or more Header cell that the table header cell is related to.
Example:
html
<!DOCTYPE html><html><head> <style> table, th, td { border: 3px solid black; } </style></head><body> <table style="width:100%"> <tr> <th id="name">Name</th> <th id="email">Email</th> <th id="phone">Phone</th> </tr> <tr> <td headers="name">Smith</td> <td headers="email">someone@gfg.com</td> <td headers="phone">+9199889</td> </tr> </table></body></html> |
Output:

Supported Browsers: The browser supported by HTML headers Attribute are listed below:
- Google Chrome
- Opera
- Safari
- Firefox
- Internet Explorer





Please Login to comment...