你能将schema.org标记包装在<p>标签中吗?</p>

时间:2012-11-06 12:10:32

标签: html microdata schema.org

我正在网站的联系页面上实施schema.org标记,以构建商家名称,地址,电话号码和电子邮件。

为了对其进行格式化,我将其中的部分内容包装在<p>个标签中。这会使schema.org标记失效吗?

以下是p代码之前的样子:

<div itemscope itemtype="http://schema.org/LocalBusiness">
<span itemprop="name">Acne co</span>
<div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
 <span itemprop="streetAddress">123 street</span>
 <span itemprop="addressLocality">London</span>,
 <span itemprop="addressRegion"></span>
 <span itemprop="postalCode">N64TF</span>
   </div>
   <span itemprop="telephone">02083548800</span>
   <span itemprop="email">studio@acne.co.uk</span>
</div> 

以下是它的样子:

<div itemscope itemtype="http://schema.org/LocalBusiness"> 
<p class="title">
     <span itemprop="name">Acne co</span>
   </p>

     <div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
   <p>
     <span itemprop="streetAddress">123 street</span><br />
     <span itemprop="addressLocality">London</span>, <span itemprop="postalCode">N64TF</span>
   </p>
   </div>

   <p>
   <span itemprop="telephone">02083548800</span><br />
   <span itemprop="email">studio@acne.co.uk</span>
   </p>
</div> 

1 个答案:

答案 0 :(得分:3)

是的,Microdata规范提供的示例具有嵌套在<span>标记内的<p>标记的相同结构。

请参阅:http://www.w3.org/TR/2011/WD-microdata-20110405/#the-basic-syntax