2

How would one write markup for a book with multiple authors?

This is what I currently have, it is marked up for just one author:

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

Would I just need to add multiple authors like this?

<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>
  • That's a lot of spans and very short paragraphs you got there... use <div>... and css to style it... not <p>. – Simon Hayter Jan 26 '16 at 15:13
2

Yes, provide multiple author properties.

But note that the itemprop has to be specified on the element with the itemscope.

<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>
  • 1
    Glad you got rid of the span containers and p :) – Simon Hayter Jan 26 '16 at 15:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.