2

I have a question about using Microdata but now showing any tagged entities on the webpage.

For example, I have a paragraph talking about two persons, but the HTML code below will show the two names on the webpage besides the sentence. Instead, I'm wondering if there's a way to only show the sentence but also get the two persons tagged with Microdata. Thanks!

<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>
4

1 回答 1

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>
于 2013-07-12T05:36:07.923 回答