html - Schema.org 项目类型 Person 与 ProfilePage

标签 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 Developer, Bloger, Avid Reader, Music Lover, Gamer;
                </p>
            </div>
        </div>
    </div>
  • 我应该使用 <body> 吗?标记为 itemtype="http://schema.org/ProfilePage"?
  • 我应该使用 <div> 吗?带有 itemtype="http://schema.org/Person"的标签如果我使用 <body>标记为 itemtype="http://schema.org/ProfilePage"?
  • 请看一下这个标记示例。我对这个概念的理解是否正确?

最佳答案

在您的示例中,ProfilePagePerson 没有任何关系。

您可以使用 mainEntityPersonProfilePage 链接起来的属性:

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

这表示 Person 是此 ProfilePage 上描述的主要实体。此外,您还可以使用 about(即 itemprop="about mainEntity")。

您当前的 itemprop="about" 嵌套在 Person 项下,但是 about property没有为 Person 定义。如果您认为它是对人物的描述,则可以改用 description 属性。

关于html - Schema.org 项目类型 Person 与 ProfilePage,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20325291/

相关文章:

html - 我如何使用 schema.org 将一个人(无需重复)标记为组织成员和一本书的作者?

html - 在图像上放置渐变,在 SVG 之前

html - 获取正确的架构以修复 "The itemprop attribute was specified, but the element is not a property of any item."

html - SDTT : "A value for the image field is required"

seo - 什么微数据使视频游戏图像出现在谷歌桌面搜索轮播上

blogs - 使用 Schema.org 标记博客的首选方法

seo - 公寓网站的语义标记

html - 创建具有动态内容的非对称两列网格的最佳方法是什么?

php - 为什么在启用 Javascript 时不忽略 <noscript> 标记内的所有内容?

html - 如何将 SASS 包含到 CSS 中