ser*_*hei 2 html microdata schema.org
请解释一下我应该为用户页面使用Schema.org的微数据?
以下是我感兴趣的网页的一个小例子:
<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 Russian Developer, Web Coder, Linux Fun, Buddist, Bloger, Avid Reader, Music Lover, Gamer;
</p>
</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
<body>itemtype ="http://schema.org/ProfilePage"的标签吗?<div>标签与项目类型="http://schema.org/Person" 如果我使用 <body>的标签与项目类型="http://schema.org/ProfilePage"?在你的例子中,ProfilePage并Person没有任何关系.
您可以使用该mainEntity属性链接Person到ProfilePage:
<body itemscope itemtype="http://schema.org/ProfilePage">
<div itemprop="mainEntity" itemscope itemtype="http://schema.org/Person">
</div>
</body>
Run Code Online (Sandbox Code Playgroud)
这表明它Person是在此描述的主要实体ProfilePage.你也可以另外使用about(即itemprop="about mainEntity").
您的当前itemprop="about"嵌套在该Person项目下,但未定义该about属性Person.如果您认为它是对此人的描述,则可以使用该description属性.