应使用 https://schema.org/Event 作为 itemtype,配合 itemscope 和 itemprop 标注;location、organizer 等对象属性须独立嵌套 itemscope;关键属性需包含 name、startDate(ISO 8601 格式)、location(Place/VirtualLocation)及 description。

itemtype 应该用 Schema.org 的 Event 类型
HTML 中的 itemtype 本身不定义语义,它只是指向一个外部词汇表。标记会议、讲座、日程这类内容,必须使用 Schema.org 官方定义的 https://schema.org/Event —— 这是唯一被主流搜索引擎(Google、Bing)和解析器广泛支持的类型。
别用 http://schema.org/Event(HTTP 已淘汰),也别自己瞎编 URL;更不要误用 Organization 或 Place 替代 Event,它们语义完全不同。
必须配合 itemscope 和 itemprop 才生效
itemtype 单独写没意义,它必须和 itemscope 成对出现,且内部属性要用 itemprop 显式标注。常见漏掉的点:
- 只加了
itemtype,忘了写itemscope→ 结构化数据完全不被识别 - 把
itemprop="startDate"写在外面,或嵌套层级错位 → 属性丢失- 日期值没用 ISO 8601 格式(如
2024-09-15T14:00:00+08:00),而用中文“9月15日14:00” → 解析失败正确最小结构示例:
<div itemscope itemtype="https://schema.org/Event"> <h2 itemprop="name">人工智能前沿讲座</h2> <time datetime="2024-09-15T14:00:00+08:00" itemprop="startDate">2024年9月15日 14:00</time><div itemprop="location" itemscope itemtype="https://schema.org/Place"> <span itemprop="name">中关村大厦报告厅</span> </div> </div>讲座类 Event 要补全关键属性,否则富媒体摘要可能不触发
Google 对
Event的富展现(如日历添加按钮、时间卡片)有硬性要求。只标name和startDate不够,至少得包含:-
name(必填) -
startDate(必填,带时区) -
location(必填,需嵌套Place或VirtualLocation) -
description(强烈建议,影响摘要展示长度) - 若为线上活动,
location应用https://schema.org/VirtualLocation,并设url属性
注意:
endDate不是必需项,但加上能提升准确性;image支持富摘要图片,但必须是公开可抓取的 HTTPS 地址。
markuplint HTML Linter for All Markup Developers下载markuplint 是一个全面的 HTML Linter,专为所有标记开发者设计。它通过可插拔的解析器架构,在 HTML、JSX、Vue、Svelte、Astro、PHP、Pug 等多种模板语言中强制执行可访问性、规范合规性和最佳实践。
嵌套结构容易出错:location 和 organizer 都要独立
itemscope很多人以为
itemprop="location"后直接写文字就行,其实location是对象类型(Place或Organization),必须另起作用域:✘ 错误写法:
北京朝阳区某某大厦
→ 解析器认为这是字符串,不是地点对象✔ 正确写法:
<div itemprop="location" itemscope itemtype="https://schema.org/Place"> <br> <span itemprop="name">某某大厦</span><br> <div itemprop="address" itemscope itemtype="https://schema.org/PostalAddress"> <br> <span itemprop="addressLocality">朝阳区</span><br> </div> <br> </div>
同理,
organizer也得套一层itemscope itemtype="https://schema.org/Organization",否则组织信息不会被提取。最常被忽略的是多场讲座共用同一页面时,每个
Event块必须严格隔离 scope,不能靠 CSS 类名或注释“假装”分隔。 - 日期值没用 ISO 8601 格式(如
前端入门到VUE实战笔记:立即使用
在学习笔记中,你将探索 前端 的入门与实战技巧!










