≪ Today I learned.
RSS購読
    公開日
    タグ
    HTML
    著者
    ダーシノ

    <cite>は作者名を入れてはならないし、<blockquote>に含めてもいけない

    引用するときに<cite>を使って引用元を明示するが、ここには著作物の名前(書籍、論文、詩、絵画などのタイトル)を入れるもので、作者名(著作者)を入れるものではない。

    The cite element represents the title of a work

    A person’s name is not the title of a work — even if people call that person a piece of work — and the element must therefore not be used to mark up people’s names.

    https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-cite-element

    また、引用時に使う<blockquote>の中に<cite>を含めることはできない。

    4.4.4 The blockquote element

    Attribution for the quotation, if any, must be placed outside the blockquote element.

    https://html.spec.whatwg.org/multipage/grouping-content.html#the-blockquote-element

    <blockquote><cite>を関連付けるためには<figure><figurecaption>を使う。

    Here a blockquote element is used in conjunction with a figure element and its figcaption to clearly relate a quote to its attribution (which is not part of the quote and therefore doesn’t belong inside the blockquote itself):

    https://html.spec.whatwg.org/multipage/grouping-content.html#the-blockquote-element:the-blockquote-element-5

    引用を正しくマークアップする

    <figure>
      <blockquote cite="https://example.com/nantoka">
        <p>xxxxx</p>
      </blockquote>
      <figcaption>
        <cite>書籍名</cite> - <span>作者</span>
      </figcaption>
    </figure>