itemtype必须是完整https url,作用是定义itemscope容器所描述的实体类型,需为可验证的外部词汇表地址且返回200状态码;必须与itemscope共存于同一语义化容器元素上。

itemtype必须是完整 HTTPS URL,不能简写或省略协议
itemtype的作用不是“选中元素”,而是告诉解析器“这个 itemscope 容器描述的是哪一类实体”。它必须是一个可验证的、外部定义的词汇表地址。Google Structured Data Testing Tool 和所有主流解析器都强制要求:值必须是绝对 HTTPS URL,且该 URL 在 HTTP 层能返回 200 状态码(哪怕内容只是 HTML 页面)。
常见错误包括:itemtype="Person"、itemtype="http://schema.org/Person"、itemtype="./schema/Person"——这些全都不生效。
- ✅ 正确写法:
itemtype="https://schema.org/Person" - ✅ 正确写法:
itemtype="https://schema.org/LocalBusiness" - ❌ 错误写法:
itemtype="Person"(无协议、无域名、非 URL) - ❌ 错误写法:
itemtype="http://schema.org/Person"(HTTP 已被拒绝) - ❌ 错误写法:
itemtype="https://schema.org/person"(大小写敏感,schema.org 官方路径全小写,但 type 名首字母大写)
itemtype必须和itemscope共存于外层容器,不能拆开或跨层
itemscope 和 itemtype 是一个绑定对,必须同时出现在同一个起始元素上,作为整个结构化数据块的“作用域锚点”。它不能加在空 <p></p> 或纯文本节点里,也不能复用给多个不相干内容块。
比如你有三篇独立文章,就得写三个独立的 <article itemscope itemtype="https://schema.org/Article"></article>,而不是只在外层套一个 <main></main> 就完事。
- 推荐用语义化标签作容器:
<article></article>、<aside></aside>、<section></section>,比<div> 更自然且利于 SEO <li>禁止写成:<code><div itemscope> <span itemtype="https://schema.org/Event">...</span>(itemtype 不在 itemscope 元素上) <li>禁止跨区块复用:一个 <code>itemscope itemtype只能管它直接包含的子元素,不能“跨过”











