itemtype必须与itemscope成对出现在同一HTML元素上,且值为schema.org下大小写敏感、无尾斜杠的完整HTTPS URL;分离书写、协议错误、大小写错误或尾部斜杠均导致结构化数据被搜索引擎静默丢弃。

itemtype 不是单独加就能起作用的属性,它必须和 itemscope 成对出现在**同一个 HTML 元素上**,且值必须是 schema.org 下某个具体类型的完整 HTTPS URL。写错格式、漏掉 itemscope、或 URL 多一个斜杠,整块结构化数据都会被搜索引擎静默丢弃。
itemtype 必须和 itemscope 写在同一元素上
这是硬性语法要求,不是风格建议。分离写法等于没写。
- ❌ 错误:
<div itemscope><section itemtype="https://schema.org/Book"></section></div>——itemtype没绑定到itemscope所在元素,解析器找不到作用域起点 - ❌ 更隐蔽的错误:
<div itemtype="https://schema.org/Product">...</div>—— 缺itemscope,整个块被忽略 - ✅ 正确:
<div itemscope itemtype="https://schema.org/Product">...</div>
itemtype 的 URL 必须是完整 HTTPS 地址,大小写敏感、无尾斜杠
2026 年所有主流解析器(Google Rich Results Test、Bing Markup Validator)已完全弃用 HTTP 和旧 vocab。以下全部无效:
-
http://schema.org/Product(协议错误) -
//schema.org/Product(协议缺失) -
https://schema.org/product(小写product,大小写敏感) -
https://schema.org/Product/(末尾多斜杠) -
Product或"schema:Product"(不是 URL)
唯一有效形式:https://schema.org/Product。验证时哪怕多一个空格或换行符,都可能导致整块被丢弃。
怎么查 itemtype 的合法值?别从 schema.org 首页瞎点
新手最常踩的坑是搜 “Person” 跳到重定向页,返回的 URL 常含多余斜杠或协议错误。
立即学习“前端免费学习笔记(深入)”;
- ✅ 正确路径:打开 https://www.php.cn/link/f9e1b74986ef91100415c120c46fcd3c(注意是 HTTPS,且结尾无
/) - 拉到页面底部 “More specific Types” 或顶部 “Type hierarchy”,确认它是顶层类型(如
https://schema.org/LocalBusiness是顶层,而https://schema.org/Restaurant是其子类) - 选错类型会导致属性失效:比如用
https://schema.org/Event却写itemprop="telephone",Google 会直接忽略——因为Event类型根本不定义telephone属性
推荐用语义化标签作容器,别堆 div
div 技术上可行,但语义上错位。搜索引擎和读屏工具无法判断内容角色。
- ✅ 推荐:
<article itemscope itemtype="https://schema.org/Article"></article>、<section itemscope itemtype="https://schema.org/FAQPage"></section> - ❌ 避免:
<div itemscope itemtype="https://schema.org/Article">(纯容器,无语义) <li>⚠️ 注意:<code><nav></nav>、<time></time>、<footer></footer>等不适用作itemscope容器;<form></form>可以加,但需确保表单本身代表一个明确实体(如ContactPage)
复杂点在于:URL 格式、作用域绑定、类型匹配这三处只要错一处,整块就失效,而且 Google 不报错,只是静默忽略——你得靠 Rich Results Test 主动验证,不能只看 HTML 是否“写全了”。



















