A basic example of microdata is given below.
<p itemscope>
<span itemprop="inventor">Tim Berners-Lee</span> created the
<span itemprop="invention">World Wide Web</span>
</p>
Use the
itemscope
and
itemprop
attributes, along with descriptive property names, to label your content.
Attribute | Description |
---|
itemscope | It is used to identify the scope of the microdata item—an item being a set of name-value pairs. |
itemprop | Defines the property names, and their associated values. |
This example yields the following name value pairs:
Inventor: Tim Berners-Lee
Invention: World Wide Web