【问题标题】:Google Structured Data Testing Tool only shows PostalAddress, not DentistGoogle 结构化数据测试工具仅显示 PostalAddress,不显示牙医
【发布时间】:2015-12-20 17:50:56
【问题描述】:

使用 Google 丰富的 sn-p 测试工具,我可以看到邮政地址的有效标记代码。但它没有显示任何关于牙医标记的信息,甚至没有显示错误:

<p itemscope itemtype="http://schema.org/Dentist" itemprop="Brand">DOTT. xxxxxx</p>
<p itemprop="address" itemscope itemtype="http://schema.org/PostalAddress"><span itemprop="streetAddress">...address....</span>     
<span itemprop="postalCode">xxxxx</span>
<span itemprop="addressLocality">xxxxx</span>
<br>tel/fax: <span itemprop="telephone">0000000</span>
<br>email: <a href="mailto:info@xxxxxx.com" 
itemprop="email">info@xxxxxx.com</a>
</p>

【问题讨论】:

    标签: html schema.org microdata google-rich-snippets


    【解决方案1】:

    这应该是牙医的地址吗?如果是,则必须将具有address 属性的元素嵌套在具有Dentist 类型的元素中:

    <div itemscope itemtype="http://schema.org/Dentist">
    
      <p itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
        <!-- … -->
      </p>
    
    </div>
    

    如果您这样做,Google 结构化数据测试工具会识别 Dentist 项目。

    在您的示例中,Dentist 项目是 Brand 属性 (itemprop="Brand") 的值。请注意,此属性不存在:Brand 是一个类型(但 brand 是一个属性;URI 区分大小写)。由于您的示例缺少父类型,我不能说在这里使用 brand 属性是否合适。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-03-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-12-16
      • 1970-01-01
      相关资源
      最近更新 更多