HTML5 块引用与作者
您好,我看到有很多不同的方法在 html 中实现 blockquote
,但在其文档中似乎并不清楚我应该如何正确格式化 blockquote
让我们说一句著名的话并提及其作者,例如:
胜利时,你值得香槟,失败时,你需要它。
拿破仑·波拿巴
HTML5 中的正确格式是什么?
作者应该位于 blockquote
标记内部还是外部? 它应该位于 cite
属性内吗? (即使知道文档指定了 URI,而不是作者)
Hi I'm seeing a great number of different ways to implementat blockquote
in html but it doesn't seem clear in its documentation how should I properly format a blockquote
let's say of a famous quote and metion its author like:
In victory, you deserve Champagne, in defeat, you need it.
Napoleon Bonaparte
What would the correct format of that be in HTML5?
Should the author be inside or outside the blockquote
tag?
Should it be inside the cite
attribute? (even knowing the documentation specifies an URI , not author)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
我用谷歌搜索了一下,看起来
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figure#quotations< /a>
http:// /www.w3.org/html/wg/drafts/html/master/grouping-content.html#the-figure-element
I googled about this and it looks like
<figure>
and<figcaption>
should do the job:https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figure#quotations
http://www.w3.org/html/wg/drafts/html/master/grouping-content.html#the-figure-element
更新 2020
WHATWG 关于 的说法块引用元素
WHATWG 关于引用元素的说法
所以下面的 HTML 就可以了:
OLD POST 2018
HTML 5.3 编辑草案,2018 年 3 月 9 日
W3C 谈到了 引用元素:
所以下面的 HTML 就可以了:
UPDATE 2020
WHATWG says about the blockquote element
WHATWG says about the cite element
So the following HTML it's fine:
OLD POST 2018
HTML 5.3 Editor’s Draft, 9 March 2018
W3C says about the cite element:
So the following HTML it's fine:
这就是 Bootstrap v3.3 中引用的方式。
有关 MDN 页脚元素的更多信息:https://developer.mozilla .org/en-US/docs/Web/HTML/Element/footer
您还可以考虑使用结构化数据,例如微数据、RDFa 和微格式。
This is how Bootstrap does quotes in v3.3.
More on the footer element from MDN: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/footer
You may also consider using Structured Data, such as microdata, RDFa, and microformats.
http://neilpie.co.uk/2011/12/13/ html5-quote-attribution/
例如,使用
HTML 5 文档说:“小字体通常包含免责声明、警告、法律限制或版权。小字体有时也用于归属或满足许可要求。”
http://neilpie.co.uk/2011/12/13/html5-quote-attribution/
For example, use
HTML 5 documentation says, "Small print typically features disclaimers, caveats, legal restrictions, or copyrights. Small print is also sometimes used for attribution, or for satisfying licensing requirements."
我的偏好并且它验证了......
My preference and it validates...
Bootstrap 4
This can be covered by Bootstrap 4
<footer class="blockquote-footer">
element: