Must blockquotes contain paragraphs or must paragraphs contain blockquotes?

后端 未结 3 1449
北荒
北荒 2021-01-18 04:01

In HTML5, is it correct to put blockquotes inside paragraphs or is the opposite the right way? I mean, logic tells that a blockquote may be citing

3条回答
  •  借酒劲吻你
    2021-01-18 04:49

    blockquote is the block-level replacement for q elements.

    If you want to quote multiple paragraphs so that it looks like a block, use blockquote and put ps inside them.

    See MDN on blockquotes

    The HTML

    Element (or HTML Block Quotation Element) indicates that the enclosed text is an extended quotation.

    The example has a

    inside a

    .

    on the other hand says:

    The HTML Quote Element () indicates that the enclosed text is a short inline quotation. This element is intended for short quotations that don’t require paragraph breaks; for long quotations use

    element.


    Bottom line: the correct usage is:

    Paragraph 1.

    Paragraph 2.

    Paragraph 3 with a short quotation.

提交回复
热议问题