HTML माइक्रोडेटा और स्कीमा
In this page:
<div itemscope itemtype="https://schema.org/Type">
<span itemprop="property">Value</span>
</div>
माइक्रोडेटा क्या है?
माइक्रोडेटा एक स्पेसिफिकेशन है जिसका इस्तेमाल मशीन-रीडेबल structured data को सीधे आपके HTML के अंदर नेस्ट करने के लिए किया जाता है। यह सर्च इंजनों को आपके कंटेंट का सटीक context समझने में मदद करता है, सिर्फ बेसिक टेक्स्ट डिस्क्रिप्शन से आगे जाकर।
उदाहरण: What is Microdata?
<div itemscope itemtype="https://schema.org/Product">
<span itemprop="name">Coffee Maker</span>
</div>
itemscope से Scope तय करना
itemscope attribute किसी specific structured item की सीमाएँ तय करता है। यह सर्च इंजनों को बताता है कि इस container के अंदर मौजूद सभी nested itemprop properties एक ही item से जुड़ी हैं।
उदाहरण: Defining Scope with itemscope
<div itemscope>
<span itemprop="name">Coffee Maker</span>
</div>
itemtype से Types डिक्लेयर करना
itemtype attribute एक URL के ज़रिए आपके item की exact vocabulary category (जैसे Book, Product, या SoftwareApplication) बताता है, जो सीधे Schema.org पर उसकी official definition से लिंक होता है।
उदाहरण: Declaring Types with itemtype
<div itemscope itemtype="https://schema.org/Book">
<span itemprop="name">The Great Gatsby</span>
</div>
itemprop से Properties मार्क करना
itemprop attribute आपके item scope के अंदर specific properties (जैसे name, description, price, या operatingSystem) को लेबल करता है। सर्च इंजन इन values को सीधे अपने indexing databases में मैप करते हैं।
उदाहरण: Marking Properties with itemprop
<div itemscope itemtype="https://schema.org/SoftwareApplication">
<span itemprop="name">My App</span>
<span itemprop="operatingSystem">Android</span>
</div>
Item Properties को नेस्ट करना
आप structured items को दूसरे items के अंदर नेस्ट कर सकते हैं। उदाहरण के लिए, एक SoftwareApplication item में एक Offer item (pricing के लिए) हो सकता है, जिसके अंदर आगे price और currency properties होती हैं, जिससे details का एक समृद्ध, hierarchical tree बनता है।
उदाहरण: Nesting Item Properties
<div itemscope itemtype="https://schema.org/SoftwareApplication">
<span itemprop="name">My App</span>
<div itemprop="offers" itemscope itemtype="https://schema.org/Offer">
<span itemprop="price">4.99</span>
<span itemprop="priceCurrency">USD</span>
</div>
</div>
- parent itemscope attribute declare करना भूल जाना, जो सभी nested itemprop properties को invalid कर देता है।
- Schema.org standards के मुकाबले property names की spelling गलत करना या उन्हें गलत तरीके से capitalize करना।
- अपने itemtype attributes के अंदर unquoted schema URLs लिखना।
- HTML Microdata search engine crawlers के लिए आपके webpage content में machine-readable structured labels जोड़ता है।
- itemscope attribute से item scopes declare करें और itemtype से उनकी category definitions specify करें।
- complex data को structure करने के लिए items को nest करते हुए अपने scope के अंदर specific content items को itemprop attribute से tag करें।
HTML Microdata parsing सभी major search engine crawlers और browsers द्वारा natively supported है।
Chapter Quiz — Complete all 9 topics to unlock
0/9 topics done
Complete these topics first: