itemtype必须与itemscope同元素使用且值为标准https url;分离写法无效,大小写、协议、路径任一错误均导致微数据被静默丢弃。

单独写 itemtype 没用,它必须和 itemscope 出现在同一个 HTML 元素上,且值必须是 https://schema.org/ 下某个类型的标准 HTTPS URL;写错一个字符(比如多斜杠、小写、HTTP 协议),整块微数据都会被搜索引擎静默丢弃。
itemtype 必须和 itemscope 写在同一元素上
这是硬性语法要求,不是风格建议。分离写法等于没写。
-
错误:
<div itemscope><section itemtype="https://schema.org/Book"></section></div>——itemtype没绑定到作用域起点,解析器找不到入口 -
错误:
<p itemtype="https://schema.org/Person">张三</p>—— 缺itemscope,契约没人签收 -
正确:
<div itemscope itemtype="https://schema.org/Person"><p itemprop="name">张三</p></div> - 推荐复用语义标签作容器,比如用
<article></article>或<aside></aside>替代无意义的<div>,更干净也利于 SEO <h3>itemtype 的值必须是完整 HTTPS URL,大小写敏感</h3> <p>Google Rich Results Test 和 Schema Markup Validator 在 2026 年已全量启用严格校验:协议、域名、路径、大小写,错一个就失效。</p><div class="aritcle_card flexRow artxards"> <div class="artcardd flexRow"> <a class="aritcle_card_img" rel="nofollow" href="/xiazai/skill8961" title="html-to-pptx-converter"><img src="https://img.php.cn/upload/skill/000/000/081/179232667384043.jpg" alt="html-to-pptx-converter" onerror="this.onerror='';this.src='/static/lhimages/moren/morentu.png'" ></a> <div class="aritcle_card_info flexColumn"> <a rel="nofollow" href="/xiazai/skill8961" title="html-to-pptx-converter" class="overflowclass">html-to-pptx-converter</a> <p class="overflowclass">使用 PptxGenJS 和 Python 解析,将结构化的 HTML/CSS 幻灯片内容转换为原生、可编辑的 PowerPoint(.pptx)演示文稿。</p> </div> <a rel="nofollow" href="/xiazai/skill8961" title="html-to-pptx-converter" class="aritcle_card_btn flexRow flexcenter"><b></b><span>下载</span> </a> </div> </div> <ul> <li> <strong>✅ 正确</strong>:<code>https://schema.org/Article、https://schema.org/Restaurant -
❌ 错误:
http://schema.org/article(协议错 + 小写)、https://schema.org/article(小写)、https://schema.org/Article/(末尾斜杠)、schema.org/Product(缺协议) - 旧域
http://data-vocabulary.org/已全量停用,2026 年起任何以该开头的itemtype都无效
类型选错会导致 itemprop 失效或被忽略
itemtype 是“契约声明”:它告诉解析器“这个容器里所有 itemprop 都得按这个类型定义来校验”。类型不匹配,字段直接被跳过。
- 用
https://schema.org/Event却写itemprop="telephone"→ Google 忽略,因为Event类型根本不定义telephone - 游戏攻略标成
https://schema.org/Game→ 校验失败,Game描述的是游戏本体,不是用户写的通关步骤 - 本地商家首页只写
https://schema.org/Organization,但页面核心是地址、电话、营业时间 → 富媒体地图卡片大概率不触发,应改用https://schema.org/LocalBusiness或更具体的子类(如Restaurant)
嵌套结构必须显式声明内层 itemscope + itemtype
复杂属性(如 address、author、review)不是字符串,而是独立实体。不声明作用域,就只是普通文本。
-
错误:
<div itemprop="address">北京市朝阳区建国路1号</div>→ 被当作文本丢弃,不解析为结构化地址 -
正确:
<div itemprop="address" itemscope itemtype="https://schema.org/PostalAddress"> <span itemprop="streetAddress">建国路1号</span><span itemprop="addressLocality">朝阳区</span> </div> - 同一页面多个同类实体(如三篇博客),每篇都必须有自己独立的
itemscope itemtype="https://schema.org/Article"容器,不能共用一个外层作用域 - 嵌套的
itemscope必须紧贴itemprop所在元素,不能隔层 ——<div itemprop="author"><div itemscope itemtype="...">...</div></div>是无效的
最常被忽略的其实是验证环节:即使 HTML 源码看着全对,也可能因 CSS 隐藏、JS 动态渲染、或 <meta> 写法导致实际解析失败。务必用 Google Rich Results Test 真实抓取并查看解析结果,而不是只扫一眼源码。










