We have the ability to define metadata at the page level but what about metadata on specific elements on the page? Microdata provides us with the answer. Microdata is an HTML specification used to add more information to HTML tags.
Tip
An interesting read to understand how Google manages metadata and microdata can be found at http://support.google.com/webmasters/bin/answer.py?hl=en&answer=99170.
We previously defined HTML5 syntax for a list of movies. Now we can specify the meaning of each tag that defines a movie. First, we need to identify the item or container using the itemscope
attribute:
<li itemscope> <h3>Dark Knight Rises</h3> <p>Action</p> </li>
Now we can specify the type of content using the itemprop
attribute and the word that defines the type of content, in this case name
and genre
:
<li itemscope> <h3 itemprop="name">Dark Knight Rises</h3> <p itemprop="genre">Action</p> </li>
Here we need...