HTML headers attribute
headers
The purpose of the HTML headers attribute is to specify a space-separated list of identifiers for table header cells.
Supported elements
HTML headers attribute supports td and th elements.
Syntax
<ElementName headers="value" >.....</ElementName>
Where ElementName is any supported elements.
Type of value
Identification reference.
Value
A string as an identifier.
Default value
There is no default value of HTML headers attribute.
Supported doctypes
HTML 4.01 strict, HTML 4.01 transitional, HTML 4.01 frameset.
Example of HTML headers attribute with td and th
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Example of HTML headers attribute with td and th</title>
</head>
<body>
<table border="1" width="100%">
<tr>
<th headers="employees">Code</td>
<th headers="salary">Salary</td>
</tr>
<tr>
<td headers="code">EM001</td>
<td headers="salary">$1600.00</td>
</tr>
</table>
</body>
</html>
Result

View this example in a separate browser window
Example of HTML headers attribute with td and th
Previous: HTML frameborder attribute
Next: HTML height attribute
Test your Programming skills with w3resource's quiz.
- Weekly Trends
- Python Interview Questions and Answers: Comprehensive Guide
- Scala Exercises, Practice, Solution
- Kotlin Exercises practice with solution
- MongoDB Exercises, Practice, Solution
- SQL Exercises, Practice, Solution - JOINS
- Java Basic Programming Exercises
- SQL Subqueries
- Adventureworks Database Exercises
- C# Sharp Basic Exercises
- SQL COUNT() with distinct
- JavaScript String Exercises
- JavaScript HTML Form Validation
- Java Collection Exercises
- SQL COUNT() function
- SQL Inner Join
We are closing our Disqus commenting system for some maintenanace issues. You may write to us at reach[at]yahoo[dot]com or visit us at Facebook