Microdata itemscope/itemprop Pattern
Classifies itemscope and parsed itemprop tokens: an item scope introduces an item and can itself be a property value of an enclosing item. This checks token presence and uniqueness, without validating vocabularies or the full item graph.
Description
Microdata describes items and their properties in HTML.
Microdata describes items and their properties in HTML. An element with itemscope introduces an item and may also act as a property value of an enclosing item.1
The tool returns introducesItem, propertyNames, nestedItemValue, uniqueNonemptyProperties. The fields describe the supplied local pattern or effective state, or contain the formatted markup shown below.
When to use Microdata itemscope/itemprop Pattern
Use this for the following task: Classifies itemscope and parsed itemprop tokens: an item scope introduces an item and can itself be a property value of an enclosing item. This checks token presence and uniqueness, without validating vocabularies or the full item graph. Provide the requested local fields extracted from the relevant element or attribute.
How to use Microdata itemscope/itemprop Pattern and understand its results
- Prepare the parsed element names, attribute values or direct element-child lists requested below. Keep attribute presence separate from its value.
- Enter itemscope, hasItemprop, itemprop according to the field table, then run the tool.
- Read introducesItem, propertyNames, nestedItemValue, uniqueNonemptyProperties. Check the effective state, recognized-token flags or generated markup against the rules below.
- Correct any reported local mismatch and check the resulting markup in its intended document and browser context.
| Input field | Meaning | Value type and bounds | Requirement |
|---|---|---|---|
| itemscope | Itemscope | boolean | Required |
| hasItemprop | Has Itemprop | boolean | Required |
| itemprop | Itemprop | string; maximum text length 100000 | Required |
Supply itemscope and hasItemprop flags plus the raw itemprop value. Tokenize on HTML ASCII whitespace, deduplicate case-sensitive property names and check nonempty uniqueness when the attribute is present.
introducesItem=itemscope; nestedItemValue=itemscope AND nonempty property list The symbols and boundary conditions refer to the supplied fields and the implementation described above.
| Output field | Meaning | Value type |
|---|---|---|
| introducesItem | Introduces Item | boolean |
| propertyNames | Property Names | list of string |
| nestedItemValue | Nested Item Value | boolean |
| uniqueNonemptyProperties | Unique Nonempty Properties | boolean |
{
"input": {
"itemscope": true,
"hasItemprop": true,
"itemprop": "author editor"
},
"output": {
"introducesItem": true,
"propertyNames": [
"author",
"editor"
],
"nestedItemValue": true,
"uniqueNonemptyProperties": true
}
} Limitations and assumptions
No vocabulary, enclosing-item relationship or full item graph is validated. The nestedItemValue flag identifies a local pattern; an absent itemprop ignores the supplied text.
The tool does not fetch a page, run a browser or validate an entire HTML document. Malformed tool requests produce input errors; valid requests can still report unrecognized values or failed local checks.
Alternative or Complementary methods
Choose Global Attributes List Lookup when you need its operation: Looks up named HTML global attributes including DOM class, id and slot. Separately identifies data-* and aria-* families without validating individual family names or event handlers. Choose Boolean Attributes List Lookup for the complementary operation: Looks up current standard HTML boolean attribute names, independent of their element applicability. Enumerated hidden, draggable and contenteditable are excluded.
Background reference: HTML Standard: Microdata itemscope/itemprop Pattern.
References
Similar or alternative tools
- Global Attributes List Lookup
Looks up named HTML global attributes including DOM class, id and slot. Separately identifies data-* and aria-* families without validating individual family names or event handlers.
- Boolean Attributes List Lookup
Looks up current standard HTML boolean attribute names, independent of their element applicability. Enumerated hidden, draggable and contenteditable are excluded.