HTML Tutorial

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उपयोग
typenumbering style बदलने के लिए
startकिसी specific number से शुरू करने के लिए
reversednumbering को उल्टा (descending) दिखाने के लिए

✅ 1. type Attribute

आप numbering style बदल सकते हैं:

<ol type="A">
  <li>Option One</li>
  <li>Option Two</li>
</ol>
Type ValueOutput
1 (default)1, 2, 3
AA, B, C
aa, b, c
II, II, III
ii, 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 ValueDescription
decimal1, 2, 3
upper-romanI, II, III
lower-alphaa, b, c
noneNo 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

  1. एक ordered list बनाइए जो 10 से शुरू होती है।
  2. एक list बनाइए जो A, B, C style में हो।
  3. एक reversed list बनाइए जिसमें ranking दिखे: 3rd → 1st।

❗ अक्सर होने वाली गलतियाँ

गलतीसमाधान
<li> को <ol> के बाहर रखाहमेशा <li> को <ol> के अंदर लिखें
Custom numbering नहीं हो रहीtype या start attribute सही से use करें
Style apply नहीं हो रहीCSS selectors और specificity चेक करें

🧠 SEO और UX के लिए सुझाव


🔚 Conclusion