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 multiple paragraps, doesn't it?
But doesn't blockquotes
need to contain q
elements? Could someone explain me the right structure?
EDIT: To add some info. I got this doubt because when trying to implement quotation marks with CSS, they don't appear on blockquote
but they do on q
elements. What is the right way to do this?
blockquote, q {
quotes: "\201C""\201D""\2018""\2019";
font-style: italic;
}
<blockquote>
<p>Hello!</p>
<p>Say something!</p>
</blockquote>
<p>He told me <q>Say something!</q>
</p>
According to the specifications provided by the W3 group the
blockquote
is a block level semantic that should contain the entire quote, which can be made up of multiple paragraphs. Because theblockquote
itself contains one or more paragraphs(or other elements), it doesn't make much sense to put it inside a paragraph. An example, provided by the W3G:As you can see, the example
blockquote
contains text that's inside ofp
elements, but not inside ofq
elements.The
q
element is a text level semantic and it should be used to indicate that part of the text is a quotation. Because theblockquote
already indicates quotation, marking the text inside withq
-elements is not necessary. An example, taken from the W3G specification:Long story short: if you use a
blockquote
element, put other elements (such asp
elements) inside of it, but it's not necessary to useq
elements inside ablockquote
.