HTML तालिका हेडर
आकार के बाद यह पाठ लेबल का अर्थ सिखाता है: th, scope, caption. दिखावट CSS में रहती है।
हेडर सेल केवल बोल्ड td क्यों नहीं
सहायक तकनीकों को असली th चाहिए। बोल्ड td दिखने में मिल सकता है पर अर्थ नहीं देता।
सीधे उत्तर
लेबल th में रखें। जरूरत पर scope और <caption> उपयोग करें। मान td में रहें।
कॉलम हेडर और caption
ऊपर की पंक्ति th scope="col" और caption।
Column headers and caption
html<table>
<caption>Weekly inventory</caption>
<tr>
<th scope="col">Item</th>
<th scope="col">Qty</th>
<th scope="col">Aisle</th>
</tr>
<tr>
<td>Notebook</td>
<td>12</td>
<td>B2</td>
</tr>
<tr>
<td>USB cable</td>
<td>7</td>
<td>A1</td>
</tr>
</table>
कॉलम उदाहरण पढ़ना
- caption table के अंदर
- ऊपर th scope=col
- मात्रा td में
नाम वाली पंक्तियों के लिए रो हेडर
पंक्ति का नाम th scope="row" — अक्सर कॉलम हेडर के साथ।
Row headers with a header row
html<table>
<caption>Team scores</caption>
<tr>
<th scope="col">Name</th>
<th scope="col">Points</th>
<th scope="col">Level</th>
</tr>
<tr>
<th scope="row">Ada</th>
<td>98</td>
<td>A</td>
</tr>
<tr>
<th scope="row">Lin</th>
<td>91</td>
<td>B</td>
</tr>
</table>
रो उदाहरण पढ़ना
- ऊपर scope=col
- Ada/Lin scope=row
- अंक td में
scope मानचित्र
संदेह होने पर यह सारणी देखें।
📊 scope attribute values
| Value | Typical use | Example cell |
|---|---|---|
| col | Header labels a column | Top “Qty” label |
| row | Header labels a row | Side “Ada” name |
| colgroup | Header for a group of columns | Advanced multi-header grids |
| rowgroup | Header for a group of rows | Advanced sectioned tables |
इस कोर्स में पहले col और row सीखें।
अभ्यास
- तीन-स्तंभ क्लब तालिका
- caption
- ऊपर th scope=col
- नामों पर th scope=row
- अस्थायी रूप से td करके अंतर देखें
आसान गलतियाँ
- बोल्ड td बिना th
- caption बाहर
- मिश्रित ग्रिड पर scope भूलना
- हर सेल th
सार
- th असली हेडर है
- scope कॉलम/पंक्ति जोड़ता है
- caption तालिका का शीर्षक
- डेटा td में
🧠 अपने ज्ञान की परीक्षा करें
अपने ज्ञान की परीक्षा करें
इस इंटरैक्टिव क्विज़ के साथ अपनी चुनौती लें और देखें कि आप विषय को कितनी अच्छी तरह समझते हैं
📝 निर्देश
- हर प्रश्न को ध्यान से पढ़ें
- हर प्रश्न के लिए सबसे अच्छा उत्तर चुनें
- आप जितनी बार चाहें क्विज़ दोबारा दे सकते हैं
- आपकी प्रगति शीर्ष पर दिखाई जाएगी