itemtype必须是完整HTTPS URL,如https://schema.org/Article,不可简写、省略协议或大小写错误;新闻内容优先用Article而非NewsArticle或Event;嵌套实体需itemprop紧贴itemscope,日期、图片、URL等须用专用标签和属性。

itemtype 必须是完整 HTTPS URL,不能简写或省略协议
给新闻内容设 itemtype 时,最常踩的坑是写成 itemtype="Article" 或 itemtype="https://schema.org/Article"(少一个 s)——2026 年所有主流结构化数据工具(Google Rich Results Test、Bing Markup Validator)都要求:必须是完整、可访问的 HTTPS URL,且服务器返回 HTTP 200。
正确写法只有一种:itemtype="https://schema.org/Article"。其他变体全无效:
-
http://schema.org/Article→ 协议被拒收 -
https://schema.org/article→ 小写article不匹配官方定义(大小写敏感) -
./Article或Article→ 解析器无法定位词汇表,直接忽略整个itemscope
新闻类内容优先用 Article,但 Event / NewsArticle 有关键区别
别看到“新闻”就下意识选 NewsArticle。它在 schema.org 中是 Article 的子类型,但 Google 富媒体摘要目前仅对 Article 提供稳定支持;NewsArticle 多用于新闻聚合平台(如 Google News)的专用抓取通道,普通网站用反而可能降低识别率。
除非你明确接入 Google News Publisher Center,否则统一用:itemtype="https://schema.org/Article"。
立即学习“前端免费学习笔记(深入)”;
另外注意:Event 完全不适用于新闻报道——它是为线下/线上活动(如发布会、直播)设计的,字段如 startDate、location 对新闻正文无意义,硬套会导致验证失败。
生成可在 deepbi 沙箱 iframe 内运行或作为独立文件运行的交互式 HTML 页面,使用 `window.deepbi` JS SDK 实现数据查询、空间管理、文件浏览及用户操作。当用户提出以下需求时启用该能力: - 创建 KPI 仪表盘、数据表格、文件浏览器、成员列表、管理页面; - 明确要求“转成 dhtml”、“转译成 HTML”、“把 XX 页面转成……”、“控制台页面”、“管理后台”、“DeepBI 页面迁移”; - 提及位于 `apps/console/src/featur
嵌套结构里 itemtype 必须紧贴 itemprop,不能隔层
新闻常需标注作者、发布机构、封面图等,这些是独立实体,必须各自声明 itemscope 和 itemtype,且必须作为 itemprop 的直接父元素。
比如标作者,正确写法是:
<div itemprop="author" itemscope itemtype="https://schema.org/Person"> <span itemprop="name">李明</span> </div>
错误写法(隔了一层 <div>):
<pre class="brush:php;toolbar:false;"><div itemprop="author">
<div itemscope itemtype="https://schema.org/Person">李明</div>
</div></pre>
<p>这种结构会让 Google 直接丢弃整个 author 块——因为 <code>itemprop="author" 没绑定到任何有效的 itemscope。
日期、图片、URL 类属性必须用专用 HTML 元素或属性
新闻的 datePublished、image、url 这些字段,光靠 itemprop 绑定文本是无效的:
-
datePublished必须用<time itemprop="datePublished" datetime="2026-10-09T14:22">2026年10月9日</time>,否则提取值是“2026年10月9日”,机器无法解析为标准时间 -
image不能写在<img itemprop="image" src="..." alt="如何在HTML中为新闻内容设置itemtype属性" >里——src不是机器可读值;得用<link itemprop="image" href="cover.jpg">或<meta itemprop="image" content="cover.jpg"> -
url同理,必须用<a itemprop="url" href="https://example.com/news/123">阅读全文</a>,不能只放文本
这些细节不处理,即使 itemtype 写对了,Google 也会报“缺失必需字段”,富媒体摘要无法触发。


















