2016-11-17 1 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 이외의 요소, audio, embed, iframe, img, source, track에 대해 말한다 video, a, area, link, object, data, meter 또는 time, "값은 요소의 textContent"입니다.

따라서 HTML 사양의 소비자는 마이크로 데이터 마크 업 소비자가 span 요소 내부의 마크 업을 무시하고 <span itemprop="genre"> <p>Science</p> <h2>fiction…에 텍스트를 사용하도록 요구합니다.

관련 문제