HTML | headers attribute

The HTML headers attribute specifies one or additional header cells a table cell is expounded to.

Applies to:

Example:



filter_none

edit
close

play_arrow

link
brightness_4
code

<!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>

chevron_right


Output:

Supported Browsers: The browser supported by HTML headers Attribute are listed below:

  • Google Chrome
  • Google Chrome
  • Opera
  • Safari
  • Firefox
  • Internet Explorer


My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.