2016-11-17 4 views
1

schema.org itempropノードの値としてマークアップを付ける方法はありますか?例えば。これは動作します: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> 

答えて

2

HTMLの仕様defines what the property value is of an element with an itemscope attributeを、そしてそれがmeta以外の要素のために言う、audioembediframeimgsourcetrackvideo,a,area,link,object,data,meterまたはtime、 "値は要素のtextContent"です。

したがって、HTML仕様では、マイクロデータマークアップの消費者はspan要素内のマークアップを無視して、<span itemprop="genre"> <p>Science</p> <h2>fiction…に記載してテキストを使用する必要があります。

関連する問題