Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

HTML | headers attribute

  • Last Updated : 06 Dec, 2021

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

Applies to: 

Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.

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

 




My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!