HTML5 Microdata

What is microdata?

  • A standardized way for providing additional semantics in the web pages is called microdata.
  • It helps you in defining your own customized elements and it even starts embedding the customized properties into the web pages.
  • Microdata consists of a group of name-value pairs at a higher level.
  • The groups are known as items. Name-value pairs are known as property. Regular elements represent items and properties.

Global Attributes

There are five global attributes introduced by microdata and available for any element to use:

a) itemscope – It is used for creating an item. It is a boolean attribute which will tell that there is a presence of microdata on this particular page by denoting its starting point.

b) itemtype – It is a valid URL that will define the item and provide the context for the properties.

c) itemid – By using this attribute the global identifier for the item is defined.

d) itemprop – By using this attribute the property of an item can be defined.

e) itemref – A list of additional elements to crawl is given by this attribute so that it finds the name-value pairs of the item.