itemtype属性必须与itemscope搭配使用才有效,医疗机构应使用https://schema.org/HealthCareOrganization类型,必需name、address(嵌套PostalAddress)、telephone,URL须严格匹配大小写和协议。

itemtype 属性必须搭配 itemscope 使用才有效
单独写 itemtype 没有任何结构化数据效果。浏览器和搜索引擎只认完整微数据三元组:带有 itemscope 的容器 + itemtype 指向的 Schema.org 类型 + 内部带 itemprop 的属性节点。
医疗机构对应的标准类型是 https://schema.org/HealthCareOrganization(不是 Organization 或 LocalBusiness),这是 Google 富媒体搜索结果和医疗类结构化数据验证的基础。
- 错误写法:
<div itemtype="https://schema.org/HealthCareOrganization">(缺 <code>itemscope) - 正确写法:
<div itemscope itemtype="https://schema.org/HealthCareOrganization"> <li>如果同时要声明多个类型(如既是医院又是诊所),用空格分隔:<code>itemtype="https://schema.org/Hospital https://schema.org/Clinic"
必需属性有哪些?Google 实际抓取时会校验
Google 对 HealthCareOrganization 的富媒体展示有硬性要求:至少提供 name、address 和 telephone。缺任一字段,结构化数据测试工具会报 warning,且无法触发医疗类搜索卡片。
地址必须嵌套为 PostalAddress 类型,不能只写字符串:
立即学习“前端免费学习笔记(深入)”;
<div itemscope itemtype="https://schema.org/HealthCareOrganization">
<span itemprop="name">仁爱社区卫生服务中心</span>
<div itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
<span itemprop="streetAddress">中山路123号</span>
<span itemprop="addressLocality">杭州市</span>
<span itemprop="addressRegion">浙江省</span>
<span itemprop="postalCode">310000</span>
</div>
<span itemprop="telephone">0571-88889999</span>
</div>
-
address必须是itemscope itemtype="https://schema.org/PostalAddress"容器,不能直接在HealthCareOrganization上用itemprop="address"写字符串 -
telephone建议带国际区号格式(如+86-571-88889999),避免被识别为无效号码 - 若机构有官网,务必加
url属性;有 logo,用logo指向图片 URL(需 HTTPS)
常见校验失败原因:URL 协议与大小写敏感
Schema.org 类型 URL 必须严格匹配,包括协议(https)、斜杠结尾(无)、大小写(HealthCareOrganization 中 C 和 O 大写)。任何偏差都会导致结构化数据解析失败。
- 错:
http://schema.org/healthcareorganization(HTTP 协议 + 全小写) - 错:
https://schema.org/HealthcareOrganization(少一个 C) - 错:
https://schema.org/HealthCareOrganization/(末尾多斜杠) - 对:
https://schema.org/HealthCareOrganization
Google Rich Results Test 工具和 Bing Webmaster Tools 都会因 URL 不精确而静默忽略整个 item。
嵌套医生信息时,itemtype 要换,且不能跨 scope 混用
如果页面还要描述该机构下的医生,必须新建 itemscope 容器,并用 itemtype="https://schema.org/Physician" —— 不能复用外层的 HealthCareOrganization 类型,也不能把医生属性(如 jobTitle)直接挂在机构节点上。
同时注意 sameAs、alumniOf 等属性只在特定类型下合法,强行加到 HealthCareOrganization 里不会报错但会被忽略。
- 医生必须独立声明:
<div itemscope itemtype="https://schema.org/Physician"> <li>可用 <code>department关联科室,但值必须是字符串或MedicalOrganization类型,不能是任意文本 - 避免在医疗机构 scope 内误写
itemprop="knowsLanguage"—— 这是Person的属性,不适用于机构
最易被忽略的是 scope 边界:每个 itemscope 是独立命名空间,属性名只在当前类型定义范围内有效。越界使用不会报错,但等于没写。



















