2013-07-10 19 views
2

我有一个关于使用Microdata的问题,但现在显示网页上的任何标记实体。Microdata没有在网页上显示标记实体

例如,我有一段讨论两个人,但下面的HTML代码将在网页上显示两个名字,除了这句话。相反,我想知道是否有办法只显示句子,但也可以让两个人用Microdata标记。谢谢!

<p>This is a paragraph about two CEOs of Apple Inc.</p> 
<div itemscope itemtype="http://schema.org/Person"> 
    <span itemprop="name">Steve Jobs</span> 
    <span itemprop="affiliation">Apple Inc.</span> 
</div> 
<div itemscope itemtype="http://schema.org/Person"> 
    <span itemprop="name">Tim Cook</span> 
    <span itemprop="affiliation">Apple Inc.</span> 
</div> 

回答

3

您可以使用元标记。

例如:

<p>This is a passage about two CEOs of Apple Inc. 
    <span itemscope itemtype="http://schema.org/Person"> 
    <meta itemprop="name" content="Steve Jobs" /> 
    <meta itemprop="affiliation" content="Apple Inc." /> 
    </span> 
    <span itemscope itemtype="http://schema.org/Person"> 
    <meta itemprop="name" content="Tim Cook" /> 
    <meta itemprop="affiliation" content="Apple Inc." /> 
    </span> 
</p>