gpt4 book ai didi

html - 图形 : When to use footer, 中的 block 引用何时使用 figcaption?

转载 作者:太空狗 更新时间:2023-10-29 15:10:01 24 4
gpt4 key购买 nike

w3.org's blockquote-page 上有两个例子:

Example 14 :

<figure>
<blockquote>
"That monster custom, who all sense doth eat
Of habit’s devil," <abbr title="et cetera">&c.</abbr> not in Folio

"What a falling off was there !
From me, whose love was of that dignity
That it went hand in hand even with the vow
I made to her in marriage, and to decline
Upon a wretch."
</blockquote>

<footer>
— <cite class="title">Shakespeare manual</cite>
by <cite class="author">Frederick Gard Fleay</cite>,
p19 (in Google Books)
</footer>
</figure>

Example 19 :

<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. We have a
method, and that method helps us to reach not absolute truth, only
asymptotic approaches to the truth — never there, just closer
and closer, always finding vast new oceans of undiscovered
possibilities. Cleverly designed experiments are the key.
</p>
</blockquote>

<figcaption>
<cite>Carl Sagan</cite>,
in "<cite>Wonder and Skepticism</cite>",
from the <cite>Skeptical Inquirer</cite> Volume 19, Issue 1 (January-February 1995)
</figcaption>
</figure>

两者看起来与我非常相似 - 内容方面。但他们说关于第一个:

Note
In the example above, the citation is contained within the footer of a figure element, this groups and associates the information, about the quote, with the quote. The figcaption element was not used, in this case, as a container for the citation as it is not a caption.

但是,我不明白这两个版本之间的区别。有人可以解释区别以及区分 footerfigcaption 的重要性吗?

最佳答案

基于以下事实:

  1. 如您所见,W3C 规范中的非规范示例似乎相互矛盾。
  2. W3C 规范不包含任何暗示这两个选项都不合适的规范文本。其中一个示例声称引用不是标题,但由于它不是规范性的,您完全有权利不同意。
  3. 来自 this WHATWG issue ,在世的规范编辑器以及 W3C CSSWG(即不是 HTML WG)成员认为这种差异在实践中并不重要,尽管前者似乎倾向于 figcaption
  4. 在实践中,大多数作者无论如何都会将属性信息放在 figcaption 中,没有明显的影响。

...结论似乎是两者之间没有有意义或实际的区别,您选择使用哪个是个人喜好的问题。

话虽如此,如果您仍然无法决定,figcaption 更符合这两种规范,而不是在一致性方面(因为 footer figcaption 同样 符合),但就它们如何描述其作用和用法而言,尤其是与 figure 元素相关(通常,您期望文本与图形相关联作为其标题)。无论哪种方式,重要的是 cite 元素,因为最终它们是传达属性语义的元素,而不是它们的容器元素。

关于html - 图形 : When to use footer, 中的 block 引用何时使用 figcaption?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48638937/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com