有没有办法将标记作为schema.org itemprop
节点的值?例如。这有效:
<div itemscope itemtype ="http://schema.org/Movie">
<h1 itemprop="name">Avatar</h1>
<span>Director: <span itemprop="director">James Cameron</span> (born August 16, 1954)</span>
<span itemprop="genre">Science fiction</span>
<a href="../movies/avatar-theatrical-trailer.html" itemprop="trailer">Trailer</a>
</div>
但是你可以做到这一点:
<div itemscope itemtype ="http://schema.org/Movie">
<h1 itemprop="name">Avatar</h1>
<span>Director: <span itemprop="director">James Cameron</span> (born August 16, 1954)</span>
<span itemprop="genre"> <p>Science</p> <h2>fiction</h2></span> <<====
<a href="../movies/avatar-theatrical-trailer.html" itemprop="trailer">Trailer</a>
</div>
答案 0 :(得分:2)
HTML规范defines what the property value is of an element with an itemscope
attribute,它表示除meta
,audio
,embed
,iframe
,img
,{之外的其他元素{1}},source
,track
,video
,a
,area
,link
,object
,{{1 }},或data
,“值是元素的textContent ”。
因此,HTML规范要求微数据标记的使用者忽略meter
中time
元素内的标记,并使用该文本。