Question

Please explain me what microdata of Schema.org I should use for the user page?

Here is a small example of a page that interests me:

<body itemscope="itemscope" itemtype="http://schema.org/ProfilePage">
    <div itemtype="http://schema.org/Person" itemscope>
        <h2 class="vcard-names">
            <span itemprop="name" class="user-name">John Doe</span>
            <em itemprop="additionalName" class="user-nick">admin</em>
        </h2>
        <div class="vcard-details">
            <dl title="Email">
                <dd>
                    <a class="email" data-email="john@doe.com" href="mailto:john@doe.com">john@doe.com</a>
                </dd>
            </dl>
            <dl title="Home Page">
                <dd>
                    <a href="http://doe.com" itemprop="url">http://doe.com</a>
                </dd>
            </dl>
            <dl title="Birthday">
                <dd>
                    <time itemprop="birthDate" content="1983-05-16T00:00:00+0000" datetime="1983-05-16T00:00:00+0000">
                        Monday, May 16, 1983
                    </time>
                </dd>
            </dl>
            <dl title="User groups">
                <dd class="tagcloud">
                    <span>Approved</span>
                    <span>Users</span>
                    <span>Admins</span>
                </dd>
            </dl>
            <div class="user-bio">
                <h4>Bio</h4>
                <p itemprop="about">
                    Inquisitive Developer, Bloger, Avid Reader, Music Lover, Gamer;
                </p>
            </div>
        </div>
    </div>
  • Should I use <body> tag with itemtype="http://schema.org/ProfilePage"?
  • Should I use <div> tag with itemtype="http://schema.org/Person" if I use <body> tag with itemtype="http://schema.org/ProfilePage"?
  • Please take a look at this markup example. Did I understood the concept correct?
Était-ce utile?

La solution

In your example, ProfilePage and Person have no relationship.

You could use the mainEntity property to link the Person with the ProfilePage:

<body itemscope itemtype="http://schema.org/ProfilePage">
  <div itemprop="mainEntity" itemscope itemtype="http://schema.org/Person">
  </div>
</body>

This conveys that the Person is the primary entity described on this ProfilePage. You could also use about in addition (i.e., itemprop="about mainEntity").

Your current itemprop="about" is nested under the Person item, but the about property is not defined for Person. If you consider it to be a description of the person, you could use the description property instead.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top