我似乎无法弄清楚将徽标部分,地址部分和社交媒体合并到一个架构组织部分的正确方法。
以下代码尝试使用itemref
属性组合三个单独的区域。
<div itemscope itemtype="http://schema.org/Organization" itemref="schemabiz schemabiz2" >
<a itemprop="url" href="www.address.com">
<div itemprop=" legalName"><strong>Business Name</strong></div>
</a>
<a itemprop="url" href="http://www.website.com">Home</a>
<img itemprop="logo" src="logo.png" />
</div>
<!-- Some content -->
<div id="schemabiz">
<div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
<span itemprop="streetAddress">Address</span>
<span itemprop="addressLocality">City</span>
<span itemprop="addressRegion">CO</span>
<span itemprop="postalCode">80525</span>
<span itemprop="addressCountry">United States</span>
</div>
</div>
<!-- Some content -->
<div id="schemabiz2" itemscope itemtype="http://schema.org/Organization">
<a itemprop="sameAs" href="http://www.facebook.com/your-company">FB</a>
<a itemprop="sameAs" href="http://www.twitter.com/YourCompany">Twitter</a>
</div>
答案 0 :(得分:0)
就像这样。
但您也可以省略外部div
并将id
添加到PostalAddress
项。
所以而不是
<div id="schemabiz">
<div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
</div>
</div>
你可以使用
<div id="schemabiz" itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
</div>
请勿对引用的元素使用itemscope
+ itemtype
。
所以而不是
<div id="schemabiz2" itemscope itemtype="http://schema.org/Organization">
</div>
你应该使用
<div id="schemabiz2">
</div>