首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >schema.org/Book与多位作者

schema.org/Book与多位作者
EN

Webmasters Stack Exchange用户
提问于 2016-01-26 12:56:57
回答 1查看 878关注 0票数 2

如何为一本有多个作者的书编写标记?

这就是我目前所拥有的,它只为一位作者标记:

代码语言:javascript
复制
<div itemscope itemtype="http://schema.org/Book">
    <h1>My Book</h1>
    <p>by
        <span itemprop="author">
            <span itemscope itemtype="http://schema.org/Person">
                <span itemprop="name">Author 1</span>
            </span>
        </span>
    </p>
</div>

我只需要添加这样的多个作者吗?

代码语言:javascript
复制
<span itemprop="author">
    <span itemscope itemtype="http://schema.org/Person">
        <span itemprop="name">Author 1</span>
    </span>
</span>
<span itemprop="author">
    <span itemscope itemtype="http://schema.org/Person">
        <span itemprop="name">Author 2</span>
    </span>
</span>
<span itemprop="author">
    <span itemscope itemtype="http://schema.org/Person">
        <span itemprop="name">Author 3</span>
    </span>
</span>
EN

回答 1

Webmasters Stack Exchange用户

回答已采纳

发布于 2016-01-26 14:40:58

是的,提供多个author属性。

但是请注意,itemprop必须在带有itemscope的元素上指定。

代码语言:javascript
复制
<div itemscope itemtype="http://schema.org/Book">
  <span itemprop="author" itemscope itemtype="http://schema.org/Person"></span>
  <span itemprop="author" itemscope itemtype="http://schema.org/Person"></span>
  <span itemprop="author" itemscope itemtype="http://schema.org/Person"></span>
</div>
票数 3
EN
页面原文内容由Webmasters Stack Exchange提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://webmasters.stackexchange.com/questions/89179

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档