Webopedia on Google+Webopedia on TwitterWebopedia on FacebookTech Bytes Blog
Main » TERM » H »

HTML microdata

HTML microdata, an HTML5 specification, is used to label content to describe a specific type of information. It is machine-readable data that is embedded in HTML documents and compatible with other data formats, including RDF and JSON. The purpose of the microdata specification is to help automated programs to better understand the content of your web page.

Microdata Item Types and Properties

Microdata could include information types such as reviews, personal information or events. Each information type has its own properties. For example properties of an event include venue, starting time, name, and category. Microdata is implemented using attributes in HTML tags, typically < span > or < div > is used to assign descriptive names to properties.

The basic syntax for HTML microdata consists of a group of name-value pairs. The groups are called items, and each name-value pair is a property. The HTML microdata specification defines five attributes that can be applied to any HTML5 tag:

  • Itemscope: Indicates the element is a microdata element and its child elements are part of its microdata format.
  • Itemtype: Defines the vocabulary to be used by the microdata format.
  • Itemid: The unique identifier of the item, if defined by the microdata vocabulary.
  • Itemprop: An individual data element.
  • Itemref: Allows a microdata element to reference another element on the page to define it by either HTML id or by itemid.

Recommended Reading: Learn more about the five attributes in this Web Developer Tutorial.

The W3C HTML Microdata Specification

The syntax and code examples are available in the W3C HTML Microdata specification. The W3C HTML Working Group is the W3C working group responsible for the HTML microdata specification.







TECH RESOURCES FROM OUR PARTNERS
LATEST ARTICLES
Slideshow: 5 Hot Holiday Gifts for Tech Enthusiasts

From cute electronic toys to VR gaming, here are 5 hot gifts to give to your special tech enthusiast this holiday season. Read More »

What's Hot in Tech: AI Tops the List

Like everything in technology, AI touches on so many other trends, like self-driving cars and automation, and Big Data and the Internet of Things... Read More »

DevOp's Role in Application Security

As organizations rush to release new applications, security appears to be getting short shrift. DevSecOps is a new approach that holds promise. Read More »

STUDY GUIDES
Java Basics, Part 1

Java is a high-level programming language. This guide describes the basics of Java, providing an overview of syntax, variables, data types and... Read More »

Java Basics, Part 2

This second Study Guide describes the basics of Java, providing an overview of operators, modifiers and control Structures. Read More »

The 7 Layers of the OSI Model

The Open System Interconnection (OSI) model defines a networking framework to implement protocols in seven layers. Use this handy guide to compare... Read More »