itemtype 和 itemscope 必须共存于同一html标签内,且itemtype值必须是完整、合法、大小写敏感、无尾斜杠的https schema.org url;itemscope仅声明实体边界,无itemtype则无法识别语义类型,导致富媒体结果失效。

itemtype 和 itemscope 必须写在同一 HTML 标签上
单独出现任何一个都无效,Google Rich Results Test 会直接跳过整块。它们不是“可选搭配”,而是绑定关系:itemscope 声明“这里是一个新实体”,itemtype 则立刻定义这个实体的类型和语义上下文。
常见错误包括:
- 在
上只写 itemscope,然后把itemtype放到子元素里 - 用
<div itemscope><section itemtype="https://schema.org/Product"> 拆开写 <li>复制旧文档时漏掉 HTTPS,写成 <code>http://schema.org/Product或//schema.org/Product -
https://schema.org/person(大小写敏感) -
https://schema.org/Person/(末尾斜杠) -
https://schema.org/#Person(带 fragment) -
https://www.schema.org/Person(域名错误) - 避免跨区块复用,比如用一个
itemscope包裹侧边栏+主内容区 - 优先复用语义化标签作容器:
<article></article>、<section></section>比空<div> 更自然,也更利于解析器理解结构 <p>嵌套时也一样:子 <code>itemscope必须是父级某个itemprop的**直接子元素**,中间不能插无关 wrapper。为什么不能只靠 itemscope 不设 itemtype
itemscope 本身不携带任何语义信息,它只是“画了个圈”,但没说圈里是什么。没有
itemtype,搜索引擎无法判断这个圈代表的是Person、Event还是Recipe,也就无法映射到对应的 rich result 类型(如食谱卡片、事件日历、人物摘要)。后果很实际:
-
itemprop="price"在没有itemtype="https://schema.org/Offer"的上下文中会被忽略 -
itemprop="author"若父级itemtype是LocalBusiness,可能被误判为组织成员而非文章作者 - Google Search Console 中结构化数据报告会显示“未识别类型”,且不计入富媒体搜索结果配额
真正容易被忽略的点是:页面可能同时存在多个
itemscope,但只有主内容区那个itemtype决定整体富媒体展示资格;其余模块若类型错配(比如在Organization下硬塞itemprop="review"),反而会触发警告。 -
正确写法只有一个:<div itemscope itemtype="https://schema.org/Product">——两个属性必须共存于同一开始标签内,且 <code>itemtype 值必须是完整、合法、末尾无斜杠的 HTTPS URL。
itemtype 的 URL 必须严格匹配 schema.org 官方路径
不是“看起来像就行”,搜索引擎解析器会做精确字符串比对。比如 https://schema.org/Person 合法,但以下全部失败:
注意:2026 年起 Google 已完全停止支持 http://data-vocabulary.org/ 系列旧地址,任何使用该前缀的 itemtype 都会被静默丢弃,不报错也不生效。
itemscope 容器必须包裹完整语义单元
它不能只是个样式占位或视觉分组容器。如果一个 <div itemscope itemtype="https://schema.org/Article"> 里面混着产品价格、作者简介、评论列表三类不同实体,Google 会因类型冲突而降权或忽略部分字段。
<p>实操建议:</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>每个独立实体(如一篇文章、一个商品、一位作者)都应有自己专属的 <code>itemscope 容器










