itemtype必须与itemscope共存于同一元素,且为完整HTTPS URL;嵌套实体需独立声明itemscope+itemtype;结构化数据须静态可解析并逐字符校验。

itemtype 本身不标记任何实体,它只是“类型声明契约”——没 itemscope,这个契约就没人执行,整块结构化数据直接被搜索引擎静默丢弃。
itemscope 和 itemtype 必须写在同一元素上
这是硬性语法要求,不是可选风格。分离即失效。
- 常见错误:
div上只写itemtype="<a href="https://www.php.cn/link/e9c90b01b593102055ded15b04c396c8">https://www.php.cn/link/e9c90b01b593102055ded15b04c396c8</a>",漏掉itemscope - 更隐蔽的错误:父级加了
itemscope,子级才写itemtype,比如<div itemscope><section itemtype="https://www.php.cn/link/e9c90b01b593102055ded15b04c396c8">...</section></div>
→ 解析器找不到作用域起点,整段忽略 - 正确写法必须是:
<article itemscope itemtype="https://www.php.cn/link/e9c90b01b593102055ded15b04c396c8">...</article>
itemtype 的值必须是完整 HTTPS URL,大小写敏感,末尾不能带斜杠。
地址、作者、品牌这些“嵌套实体”必须各自声明 itemscope + itemtype
itemprop 只是字段名,不代表结构。比如 itemprop="author" 后面跟一段文字,搜索引擎只会当普通文本;要让它识别为“人”,就得显式包裹成独立作用域。
立即学习“前端免费学习笔记(深入)”;
- 错误写法:
<div itemprop="author">张三</div>→ 张三被当作文本,不是 Person 实体 - 正确写法:
<div itemprop="author" itemscope itemtype="https://schema.org/Person"><span itemprop="name">张三</span></div>
- 同理,
address必须嵌套PostalAddress类型,logo必须用img标签并带itemprop,不能靠父级“继承”
Google Rich Results Test 报 “address not detected” 或 “author missing” 时,90% 是这里漏了内层 itemscope。
同一页面多个同类实体,不能共用一个 itemscope
比如企业官网首页有「总部」「上海分部」「深圳分部」三个地址,不能只写一个 <div itemscope itemtype="<a href=" https:>https://schema.org/Organization"> 然后把三段地址全塞进去。<ul>
<li>这会被解析为一个 Organization 实例,所有 <code>address、telephone 都归到同一个对象下
<div itemscope itemtype="https://schema.org/Organization">...总部...</div>
<div itemscope itemtype="https://schema.org/Organization">...上海分部...</div>
<div itemscope itemtype="https://schema.org/Organization">...深圳分部...</div>
DOM 结构必须静态可解析,别用 JS 动态批量加 itemscope —— 搜索引擎不等 JS 执行完就抓取了。
真正容易被忽略的是:验证必须看实际解析结果,而不是 HTML 是否“看起来对”。
哪怕 itemtype URL 多一个空格、少一个字母,或嵌套的 PostalAddress 漏了 streetAddress,Google Rich Results Test 都可能标黄警告甚至完全不显示富摘要。结构化数据不是写了就生效,它是逐字符校验的契约系统。



















