itemtype必须是完整https url,如https://schema.org/product;itemscope与itemtype须成对出现于块级元素;itemprop需符合父级itemtype定义且多值属性须分元素声明。

itemtype 必须是完整 HTTPS URL,不能缩写或本地路径
itemtype 的唯一合法值是一个可验证的、外部定义的词汇表绝对地址,比如 https://schema.org/Product。它不是字符串别名,也不是相对路径,更不是你自定义的类名。
常见错误包括:itemtype="Product"、itemtype="./schema#Person"、itemtype="http://schema.org/Article"(少一个 s)——这些全都会导致 Google Rich Results Test 直接跳过整个 itemscope 块。
验证要点:
- 协议必须是
https,不是http - 域名必须完整,不能省略
www或拼错(如schmea.org) - 路径需严格匹配 schema.org 官方类名,大小写敏感(
https://schema.org/Organization≠https://schema.org/organization) - 该 URL 在 HTTP 层必须返回 200 状态码(哪怕只是 HTML 页面,不强制要求 JSON-LD)
itemscope 和 itemtype 必须成对出现在块级容器上
单独写 itemscope 或只写 itemtype 都无效。它们必须同时出现在同一个块级元素上,且这个元素得能包裹整块语义内容。
错误写法:<h1 itemscope itemtype="https://schema.org/Event">会议开幕</h1> —— h1 是内联语义容器,无法承载完整实体(比如时间、地点、组织者等子属性),解析器会忽略所有后续 itemprop。
正确做法是用 <div>、<code><section></section> 或 <article></article> 包裹:
<article itemscope itemtype="https://schema.org/Event"><h1 itemprop="name">会议开幕</h1> <time itemprop="startDate" datetime="2026-08-15">2026年8月15日</time></article>
注意:itemscope 不能加在 <p></p>、<span></span> 或文本节点上;浏览器不报错,但结构化数据提取器会跳过。
itemprop 绑定必须依赖 itemtype 的上下文约束
itemprop 不是万能字段名,它的合法性取决于父级 itemtype 所定义的 Schema 类型。比如 https://schema.org/Person 允许 jobTitle,但 https://schema.org/Book 就不认这个属性。
常见踩坑点:
- 在
itemtype="https://schema.org/Restaurant"下写itemprop="author"—— 这个属性属于Article,不是餐厅类型 - 把日期直接塞进
<p itemprop="datePublished">2026-08-10</p>—— 解析器读到的是字符串,不是机器可读日期;应改用<time itemprop="datePublished" datetime="2026-08-10"></time> - 对 URL 类属性(如
url、image)直接写文本内容,而不是用href或<link>—— 导致提取出“官网”而非实际链接
多个 itemprop 值要拆成多个元素,不能合并
Schema 规范里明确:多值属性(如 sameAs、keywords、review)必须用多个独立元素声明,每个带相同的 itemprop 名。
错误写法:<div itemprop="sameAs">https://twitter.com/example https://github.com/example</div> —— 解析器只会提取第一个空格前的内容,即 https://twitter.com/example。
正确写法:
<div itemscope itemtype="https://schema.org/Person"> <link itemprop="sameAs" href="https://twitter.com/example"> <link itemprop="sameAs" href="https://github.com/example"> </div>
这种“一值一元素”的规则也适用于 itemprop="review" 或嵌套对象(如 author 指向另一个 itemscope)——漏掉任何一个,结构化数据就断链。
最易被忽略的是:itemtype URL 的大小写、斜杠结尾、协议完整性,三者任一出错,整个微数据块就静默失效,连 warning 都不会抛——只能靠 Google Rich Results Test 实时验证,别凭肉眼判断。











