एचटीएमएल हेडर विशेषता
परिभाषा और उपयोग
विशेषता एक headers
या एक से अधिक हेडर सेल निर्दिष्ट करती है जिससे एक टेबल सेल संबंधित है।
पर लागू होता है
विशेषता का headers
उपयोग निम्नलिखित तत्वों पर किया जा सकता है:
तत्वों | गुण |
---|---|
<टीडी> | हेडर |
<वें> | हेडर |
उदाहरण
टीडी उदाहरण
निर्दिष्ट करें कि <वें> तत्व प्रत्येक <td> तत्व से संबंधित है:
<table>
<tr>
<th id="name">Name</th>
<th id="email">Email</th>
<th id="phone">Phone</th>
<th id="addr">Address</th>
</tr>
<tr>
<td headers="name">John Doe</td>
<td headers="email">[email protected]</td>
<td headers="phone">+45342323</td>
<td headers="addr">Rosevn 56,4300 Sandnes,Norway</td>
</tr>
</table>
गु उदाहरण
प्रत्येक हेडर सेल से संबंधित <वें> तत्व निर्दिष्ट करें:
<table>
<tr>
<th id="name" colspan="2">Name</th>
</tr>
<tr>
<th headers="name">Firsname</th>
<th headers="name">Lastname</th>
</tr>
</table>
ब्राउज़र समर्थन
विशेषता में headers
प्रत्येक तत्व के लिए निम्नलिखित ब्राउज़र समर्थन है:
Element | |||||
---|---|---|---|---|---|
td | Yes | Yes | Yes | Yes | Yes |
th | Yes | Yes | Yes | Yes | Yes |