מיקרו נתונים הוא מפרט להטמעת נתונים קריאים למחשבים במסמכי HTML. מיקרו נתונים מורכבים מצמדים של שם-ערך (המכונים items
) המוגדרים בהתאם לאוצר מילים. schema.org מספק אוסף של אוצרות מילים נפוצים של תגי עיצוב.
התחביר הבסיסי כולל את המאפיין itemscope
כדי להגדיר פריט, ואת המאפיין itemprop
לתיאור אחד ממאפייני הפריט. הסוגים מצוינים באמצעות המאפיין itemtype
ויכולים להניח שהם מוגדרים באוצר המילים הנבחר. למשל, schema.org
מגדיר סוגים כמו http://schema.org/Person
או http://schema.org/PostalAddress
.
הדוגמה הבאה (מ-Wikipedia) מראה איך להשתמש במיקרו נתונים כדי לתאר אדם:
<section itemscope itemtype="http://schema.org/Person">
Hello, my name is
<span itemprop="name">John Doe</span>,
I am a
<span itemprop="jobTitle">Graduate research assistant</span>
at the
<span itemprop="affiliation">University of Dreams</span>
My friends call me
<span itemprop="additionalName">Johnny</span>
You can visit my homepage at
<a href="http://www.example.com.com" itemprop="url">www.example.com</a>
<section itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
I live at
<span itemprop="streetAddress">1234 Peach Drive</span>
<span itemprop="addressLocality">Warner Robins</span>
<span itemprop="addressRegion">Georgia</span>.
</section>
</section>
אפשר להשתמש בכלי Schema Validator כדי לנפות באגים בתגי העיצוב ולאמת אותם מול הסכימה הנתמכת.