Internet
Fact-checked

At EasyTechJunkie, we're committed to delivering accurate, trustworthy information. Our expert-authored content is rigorously fact-checked and sourced from credible authorities. Discover how we uphold the highest standards in providing you with reliable knowledge.

Learn more...

What is Microdata?

Page Coleman
Page Coleman

Microdata is an HTML-5 specification for adding machine-readable code to a document such as a web page, and the specification should not be confused with companies that are called microdata systems. All microdata is usually added to HTML tags that display information that is visible to human users. By adding information to already-used tags, a developer can label elements of page content so that search engines and other applications can more easily categorize the content. These labels describe the type of content, such as various aspects of products, organizations, or people information. The specification does not describe the presentation, or appearance, of the content.

Document content, such as an organization’s name, address, phone number, and website URL, is labeled using groups, known as items, of name-value pairs. Within the HTML-5 code, the developer will notate content as an item, and then add item properties such as strings, URLs, dates, and time to that item. The and

tags are frequently the base tags to which the microdata information is added. Just as HTML can be nested, microdata can also be nested. A starting set of vocabularies for the item properties is available at the Data Vocabulary organization website.

The following is an example of using microdata to describe a product:

<div itemscope itemtype="http://www.website.com/product">
     <p>Product Name: <span itemprop = "name">Banana</span></p>
     <p>Food Group: <span itemprop = "category">Fruit</span></p>
     <p>Producer: <span itemprop = "brand">Dole</span></p>
     <p>Product ID: <span itemprop = "indentifier">123456789</span></p>
     <img itemprop="image" src="banana-photo.png" alt="banana">
</div>

Microdata use is compatible with Resource Description Framework (RDFa). RDFa works with XHTML’s attribute level extensions. This specification, however, is more simple than the specification for RDFa, and it is part of the HTML-5 specification. Both RDFa and microdata usage are forms of semantic markup.

Any microdata can be extracted for use with JavaScript Object Notation (JSON). JSON is a data-interchange format, considered light-weight, that humans can read. JSON may be used with Asynchronous Javascript and XML (AJAX) programming methods. These methods allow web application data to be fetched from a server without affecting the web page’s behavior and appearance. Web 2.0 applications frequently make use of AJAX, so microdata systems may be useful for these programs.

Search engines scan pages for content structured with microdata so that its rich snippets can present better information on the search results page. It is of particular use in improving local search results, which consists of special search engines going through a specified region’s business listings data. The company has information on how to add this code to HTML documents in its webmaster tools section.

Discuss this Article

Post your comments
Login:
Forgot password?
Register:
    • Man holding computer
      Man holding computer