假设我有以下句子我想添加丰富的片段:
我在纽约生活和工作
由于纽约既是我的居住地,也是我工作的城市,理论上我想使用schema.org标准来标记这样的行:
<div itemscope itemtype = 'http://schema.org/Person'>I live and work in
<span itemprop = 'homeLocation' itemprop = 'workLocation'>New York</span></div>
Run Code Online (Sandbox Code Playgroud)
在一个span标记中有2个itemprops是否有效?如果没有,下面会工作吗?
<div itemscope itemtype = 'http://schema.org/Person'>I live and work in
<span itemprop = 'homeLocation'><span itemprop = 'workLocation'>New York
</span></span></div>
Run Code Online (Sandbox Code Playgroud) 我有一个公司页面,其上列有所有本地分支机构.
对于每个酒店,我正在尝试使用元标记添加branchOf属性,但Yandex和Google Snippets都为此属性显示为空白.有可能这样做吗?
<div itemscope itemtype="http://schema.org/Organization" id="schema-organization">
<meta itemprop="description" content="blah blah blah" />
<a href="/" itemprop="url">
<h1 itemprop="name">The Hotel Chain</h1>
</a>
<div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
<div itemprop="addressLocality">new york city</div>
<meta itemprop="addressRegion" content="NY" />
</div>
</div>
<!-- snip -->
<div itemscope itemtype="http://schema.org/Hotel">
<meta itemprop="branchOf" itemref="schema-organization" />
<h2 itemprop="name">Hotel Location 1</h2>
<a href="http://maps.google.com/blahblah" itemprop="map">Get directions on Google Maps</a>
<div itemprop="geo" itemscope itemtype="http://schema.org/GeoCoordinates">
<meta itemprop="latitude" content="40.7450605" />
<meta itemprop="longitude" content="-73.98301879999997" />
</div>
<div class="wrap-address clearfix" itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
<ul class="ul-reset">
<li><span …Run Code Online (Sandbox Code Playgroud)