itemtype 必须用 schema.org 的完整 https url,如 https://schema.org/service;servicetype 和 provider 为必填字段,后者需嵌套 organization 或 person;避免滥用非语义标签、重复声明及错误填充 price、areaserved 等属性。

itemtype 必须用 Schema.org 的完整 URL
直接写 itemtype="Service" 是无效的,浏览器和结构化数据工具完全不识别。Schema.org 要求使用带协议的绝对 URL,比如 https://schema.org/Service。常见错误是漏掉 https://、写成相对路径,或误用旧版 http://(虽然部分解析器仍兼容,但 Google 推荐 HTTPS 版本)。
实际使用时,itemtype 总是和 itemscope 成对出现:
<div itemscope itemtype="https://schema.org/Service"> <h2 itemprop="name">网站性能优化服务</h2> <p itemprop="description">提供前端加载加速与 Core Web Vitals 优化</p> </div>
serviceType 和 provider 是关键必填字段
Google Search Console 和 Rich Results 测试工具对 Service 类型有隐式校验:如果缺失 serviceType 或 provider,即使 HTML 语法正确,也可能被标记为“缺少必要属性”或无法触发富媒体结果。
-
serviceType应为字符串,描述服务本质,比如"Web Development"或"SEO Consulting",不是公司名或页面标题 -
provider必须指向一个Organization或Person实体,不能是纯文本;需嵌套itemscope itemtype - 若服务由个人提供,
provider可用https://schema.org/Person;企业则用https://schema.org/Organization
示例中 provider 嵌套写法:
<div itemscope itemtype="https://schema.org/Service">
<span itemprop="serviceType">Cloud Migration</span>
<div itemprop="provider" itemscope itemtype="https://schema.org/Organization">
<span itemprop="name">Acme Tech</span>
</div>
</div>
避免在非语义容器上滥用 itemscope
itemscope + itemtype 不该套在 <div> 或 <code><span></span> 这类无语义标签上,除非它们确实包裹了完整的、可独立识别的服务信息单元。更稳妥的做法是优先用语义化标签(如 <article></article>、<section></section>)承载 itemscope。
容易踩的坑包括:
使用 PptxGenJS 和 Python 解析,将结构化的 HTML/CSS 幻灯片内容转换为原生、可编辑的 PowerPoint(.pptx)演示文稿。
- 把整个页脚
<footer></footer>设为Service,但里面混着地址、电话、社交媒体链接——这些不属于 Service 的标准属性,会稀释结构化数据可信度 - 多个服务共用一个
itemscope容器,导致itemprop值互相污染(例如两个name出现在同一 scope 下) - 在
<script type="application/ld+json"></script>已存在 JSON-LD 的前提下,又加 HTML 微数据,造成重复声明,可能触发 Google 的冗余警告
price、areaServed 和 offers 需按实际业务逻辑填充
Service 类型支持 price,但它不是数字,而是字符串格式的价格说明(如 "From $500/month" 或 "Free consultation")。不要传 199.99 这样的纯数字,否则会被忽略。
地域服务范围 areaServed 接受 Place、AdministrativeArea 或字符串(如 "United States"),但字符串匹配粒度粗,不利于本地搜索曝光;推荐嵌套 Place 并设 address 或 geo。
如果服务带明确报价方案(如“基础版”“企业版”),应使用 offers 属性,它要求值为 Offer 类型,不能直接写文字描述:
<div itemprop="offers" itemscope itemtype="https://schema.org/Offer"> <span itemprop="price">$1,200</span> <span itemprop="priceCurrency">USD</span> </div>
复杂服务往往涉及多层嵌套和属性约束,比如 provider 下还要声明 logo、sameAs 才算完整;单纯塞几个字段,离真正被搜索引擎理解还有距离。










