< q>之间的差异和< blockquote> [英] Differences between <q> and <blockquote>
问题描述
有几篇关于该主题的文章,但是我无法理解< q>
和< blockquote>
之间的相关区别.区块引用链接的规范似乎已更改.似乎长引用被保留用于块引用,内联引用被保留用于< q>
.
There are several articles about this topic but I'm not able to understand the relevant difference between <q>
and <blockquote>
. The spec seems to have changed for blockquote link. It seems that long quotations are reserved for blockquote and inline quotation for <q>
.
内联引号是什么意思?
需要一个作者的名字吗?
Does one need to have the name of an author?
例如:如果报价是一家公司及其一句长句子,该怎么办?我会使用< q>
,但是我不知道如何使用参数来捍卫这一点.
For example: what if the quote is of a company and its one long sentence. I would use <q>
but I would not know exactly how to defend that point with arguments.
推荐答案
仅查看其定义:
-
q
元素:
[…]来自其他来源的一些措辞内容
[…] some phrasing content quoted from another source
[…]引用其他来源的部分
[…] a section that is quoted from another source
最后一部分是相同的(引用另一个来源"),因此它们的区别仅在于措辞内容"与部分".
The last part is the same ("quoted from another source"), so they only differ in "phrasing content" vs. "section".
q
只能包含措辞内容(并且只能在需要此类措辞内容的地方使用). blockquote
只能包含 div
(〜 blockquote
).
q
can only contain phrasing content (and it can only be used where such phrasing content is expected). blockquote
can only contain flow content (and it can only be used where such flow content is expected). In that sense, they are similar to span
(~ q
) and div
(~ blockquote
).
其他一些差异:
请注意, blockquote
是大纲. q
首先不能包含标题或分段元素.
Note that blockquote
is a sectioning root, which means that any headings or sectioning elements it may contain will not be part of the document’s outline. q
can’t contain headings or sectioning elements in the first place.
请注意,在使用 q
时,切勿使用任何引号(不要在引号之前,内部,之后),因为用户代理应自动添加引号.对于 blockquote
没有这样的限制(但是,您可能不太可能需要用到一些块引号).
Note that you MUST NOT use any quotation marks when using q
(not before, not inside, not after), because user agents should add them automatically. There is no such restriction for blockquote
(however, it’s probably unlikely that you’d need some for block quotes).
这篇关于< q>之间的差异和< blockquote>的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!