itemtype必须与itemscope同元素出现且值为完整HTTPS URL(如https://schema.org/Article),大小写、协议、斜杠等任一错误均导致结构化数据被静默丢弃;子实体须独立声明itemscope和itemtype,不可继承。

itemtype 必须和 itemscope 写在同一 HTML 元素上,且值只能是 schema.org 的完整 HTTPS URL(如 https://schema.org/Article),写错协议、大小写、斜杠或类型都会导致整块结构化数据被搜索引擎静默丢弃。
itemtype 必须和 itemscope 同元素出现
这是硬性语法要求,不是风格建议。分离写法等于没写。
- ❌ 错误:
<div itemscope><section itemtype="https://schema.org/Book"></section></div>——itemtype没绑定到作用域起点 - ❌ 更隐蔽的错误:
<div><span itemscope itemtype="https://schema.org/Person"></span></div>—— 外层<div>没itemscope,但很多人误以为它能“继承”作用域 - ✅ 正确:
<article itemscope itemtype="https://schema.org/Article">...</article>
itemtype 值必须是完整 HTTPS URL,不能缩写或拼错
浏览器和 Google Rich Results Test 会严格校验这个 URL:协议、域名、路径、大小写、末尾斜杠,错一个字符就失效。
- ✅ 正确:
https://schema.org/Organization、https://schema.org/RadioEpisode - ❌ 协议错误:
http://schema.org/Person(HTTP 已全量弃用) - ❌ 大小写错误:
https://schema.org/person(必须首字母大写) - ❌ 尾部斜杠:
https://schema.org/Event/(末尾不能有/) - ❌ 相对路径或简写:
Organization、./vocab/brand、//schema.org/LocalBusiness
选错 itemtype 类型会导致 itemprop 失效
itemprop 的合法性取决于父级 itemtype 是否定义了该属性。类型不匹配,字段直接被忽略——不是报错,而是静默丢弃。
立即学习“前端免费学习笔记(深入)”;
- 用
https://schema.org/Event却写itemprop="telephone"→ Google 无视该属性(telephone不在 Event 定义中) - 用
https://schema.org/Restaurant写itemprop="menu"→ 有效;但换成https://schema.org/Organization就无效(menu是 Restaurant 特有) - 查类型是否支持某属性,必须去
https://schema.org/XXX页面看 “Properties” 列表,别凭经验猜
嵌套结构里每个实体都要独立声明 itemtype
微数据不支持“继承”或“默认类型”。子对象(如 author、address)必须显式包裹自己的 itemscope itemtype。
- ❌ 错误:
<div itemscope itemtype="https://schema.org/Article"><p itemprop="author">张三</p></div>——author是 Person 实体,不能只靠文本撑起结构 - ✅ 正确:
<div itemscope itemtype="https://schema.org/Article"><p itemprop="author" itemscope itemtype="https://schema.org/Person"><span itemprop="name">张三</span></p></div> - 地址同理:
itemprop="address"必须嵌套itemscope itemtype="https://schema.org/PostalAddress",不能只写文本



















