Noah
Noah

Reputation: 73

Microdata without showing tagged entities on webpage

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>

Upvotes: 2

Views: 94

Answers (1)

Micha&#235;l Hompus
Micha&#235;l Hompus

Reputation: 3469

You can use meta tags.

For example:

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

Upvotes: 3

Related Questions