此页面上的其他答案已过时,但问题仍然有效。
该q
元素在语义上表示一个引用,并且是一个内联元素。它应该像这样使用(即其中没有块元素):
<p>
In the words of <cite>Charles Bukowski</cite> -
<q>An intellectual says a simple thing in a hard way.
An artist says a hard thing in a simple way.</q>
</p>
另一个例子:
<p>
<q>This is correct, said Hillary.</q> is a quote from the
popular daytime TV drama <cite>When Ian became Hillary</cite>.
</p>
q
元素不应放在元素内blockquote
,因为它是多余的——两者都表示引号。
Ablockquote
是一个块元素,允许在里面放置其他块元素:
<blockquote>
<p>My favorite book is <cite>At Swim-Two-Birds</cite>.</p>
- <cite>Mike Smith</cite>
</blockquote>
<cite>
是一个内联元素,表示作品的标题。由于 W3C 和 WHATWG 现在已经同意合作,我们对它可能包含的内容有一个答案:书名、电影名、电视节目名、游戏名、歌曲名、戏剧名等,等等。
它不应该是 URL 或作者的名字。
这是一个有效的用法:
<figure>
<blockquote>
<p>The truth may be puzzling. It may take some work to grapple with.
It may be counterintuitive. It may contradict deeply held
prejudices. It may not be consonant with what we desperately want to
be true. But our preferences do not determine what's true.</p>
</blockquote>
<figcaption>Carl Sagan, in "<cite>Wonder and Skepticism</cite>", from
the <cite>Skeptical Inquirer</cite> Volume 19, Issue 1 (January-February
1995)</figcaption>
</figure>