HTML with Microdata
Based on an HTML document, this encoding processes nodes with Microdata-related attributes, such as itemscope
, itemtype
, and itemprop
.
Example
<html>
<body>
<div itemscope itemtype="https://schema.org/WebSite">
<a href="https://www.namedgraph.com/" itemprop="url">
<span itemprop="name">Named Graph</span>
</a>
</div>
</body>
</html>
Messages
Ignored "content" Attribute
This message indicates a content
attribute was used on a generic element with an itemprop
attribute. The specification only allows for the content
attribute to be used on a meta
tag. While some agents support this behavior and will use the attribute value, such as Google, other agents may not. We generally ignore an incorrect usage of content
and will report it as a warning.
Note: within RDFa/HTML the content
attribute is valid and supported as a global attribute.
Examples
Usage | Code |
---|---|
Invalid | <span itemprop="name" content="Invalid">Valid</span> |
Valid | <meta itemprop="name" content="Valid" /> |
Technical Notes
- Reference: HTML, Microdata
- Media Type:
application/xhtml+xml
(ortext/html
,text/xhtml
) - File Name:
*.html
(or*.htm
)