HTML Ordered List – <ol> Tag का उपयोग और उदाहरण हिंदी में | Numbered List
HTML में Ordered List का उपयोग step-by-step या क्रम से information दिखाने के लिए होता है। इस लेख में जानिए <ol>
टैग क्या होता है, इसके attributes, examples, CSS styling और best SEO practices – पूरी जानकारी हिंदी में।
🔷 HTML Ordered List क्या है?
HTML में Ordered List वह सूची होती है जिसमें items क्रम (order) में होते हैं — जैसे 1, 2, 3… या A, B, C… आदि। यह list टैग से बनाई जाती है।
इसका प्रयोग तब किया जाता है जब information को specific sequence में दिखाना ज़रूरी हो — जैसे steps, instructions, ranking आदि।
🔨 Syntax (Structure)
<ol>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
</ol>
📌 यहां <ol>
से ordered list शुरू होती है और <li>
से हर list item लिखा जाता है।
ब्राउज़र default रूप से 1, 2, 3… क्रम में दिखाता है।
🔎 Output कैसा दिखेगा:
1. HTML
2. CSS
3. JavaScript
🧪 Example 1: Installation Steps
<ol>
<li>Download the software</li>
<li>Install the setup</li>
<li>Run the application</li>
</ol>
🔷 <ol>
टैग के Attributes
HTML में Ordered List को customize करने के लिए कुछ attributes दिए गए हैं:
Attribute | उपयोग |
---|---|
type | numbering style बदलने के लिए |
start | किसी specific number से शुरू करने के लिए |
reversed | numbering को उल्टा (descending) दिखाने के लिए |
✅ 1. type
Attribute
आप numbering style बदल सकते हैं:
<ol type="A">
<li>Option One</li>
<li>Option Two</li>
</ol>
Type Value | Output |
---|---|
1 (default) | 1, 2, 3 |
A | A, B, C |
a | a, b, c |
I | I, II, III |
i | i, ii, iii |
✅ 2. start
Attribute
List को किसी specific number से शुरू करने के लिए:
<ol start="5">
<li>Step One</li>
<li>Step Two</li>
</ol>
📌 Output:
5. Step One
6. Step Two
✅ 3. reversed
Attribute
List को उल्टा क्रम (descending order) में दिखाने के लिए:
<ol reversed>
<li>Gold</li>
<li>Silver</li>
<li>Bronze</li>
</ol>
📌 Output:
3. Gold
2. Silver
1. Bronze
🎨 CSS से Ordered List को Style करना
<style>
ol {
padding-left: 30px;
list-style-type: lower-roman;
}
</style>
📌 list-style-type
के द्वारा numbering को बदल सकते हैं (CSS way):
CSS Value | Description |
---|---|
decimal | 1, 2, 3 |
upper-roman | I, II, III |
lower-alpha | a, b, c |
none | No numbering |
🧪 Nested Ordered List (List के अंदर List)
<ol>
<li>Frontend
<ol>
<li>HTML</li>
<li>CSS</li>
</ol>
</li>
<li>Backend</li>
</ol>
📌 इससे sub-list numbered format में दिखती है।
✅ Practice Task
- एक ordered list बनाइए जो 10 से शुरू होती है।
- एक list बनाइए जो A, B, C style में हो।
- एक reversed list बनाइए जिसमें ranking दिखे: 3rd → 1st।
❗ अक्सर होने वाली गलतियाँ
गलती | समाधान |
---|---|
<li> को <ol> के बाहर रखा | हमेशा <li> को <ol> के अंदर लिखें |
Custom numbering नहीं हो रही | type या start attribute सही से use करें |
Style apply नहीं हो रही | CSS selectors और specificity चेक करें |
🧠 SEO और UX के लिए सुझाव
- Step-by-step content के लिए ordered list ज़रूर use करें
- Breadcrumbs, FAQs, और Tutorials में इसका उपयोग अच्छा UX देता है
- Mobile में spacing और visibility का ध्यान रखें
🔚 Conclusion
- Ordered List HTML में sequence-based content दिखाने के लिए उपयोगी होती है।
type
,start
, औरreversed
attributes से आप list को control कर सकते हैं।- CSS से list को visually सुंदर और responsive बनाया जा सकता है।