CKTIS / HTML
itemprop — microdata property names
The itemprop attribute assigns microdata property names to an element. The attribute supplies the names, while the value comes from the element, its contents, or an appropriate attribute.
Version: WHATWG HTML Living Standard; index snapshot date recorded separately
Syntax
itemprop="property-name [other-property-name ...]"itemprop adds properties to a microdata item created by itemscope. It can appear on any HTML element, but must belong to at least one item. Properties are usually descendants of the item; itemref can include properties outside its subtree.
The attribute value is a nonempty set of unique names separated by ASCII whitespace. Multiple names assign the same value to multiple properties. Separate elements can supply multiple values for the same property. Allowed names depend on the type's vocabulary; absolute URLs are also possible. Plain names in an untyped item serve local uses.
itemprop specifies the name, not the value. An ordinary span supplies text, data uses value, and a uses the URL from href. Combining itemprop with itemscope makes the property's value a nested item.
The example uses local names without declaring a type. Both name and label have the value Ada; code has the value A17, not the visible text Member.
Examples
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<title>itemprop example</title>
<div itemscope>
<span itemprop="name label">Ada</span>
<data itemprop="code" value="A17">Member</data>
</div>
</html>Result
{"properties":{"name":["Ada"],"label":["Ada"],"code":["A17"]}}The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.