在网络上的所有示例中,我都看到了微数据属性itemscope并将itemtype其应用于div元素,如下所示:
itemscope
itemtype
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">Science fiction</span> <a href="../movies/avatar-theatrical-trailer.html" itemprop="trailer">Trailer</a> </div>
但是微数据可以应用于任何其他元素吗?在我的情况下,我想将其应用于列表项:
<ul> <li 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> </li> </ul>
有任何已知的问题吗?
简而言之,是。亲自查看Google页面,看看他们在不同的标签中使用它