多个blockquote_换句话说:使用blockquote,cite和q元素

多个blockquote

Frequently ignored and often abused, the <blockquote>, <cite> and <q> elements can contribute greatly to creating a semantically and typographically rich page if they are used correctly.

如果经常使用<blockquote><cite><q>元素,这些元素经常被忽略并且经常被滥用,它们可以极大地有助于创建语义和印刷丰富的页面。

The most important thing to remember about all three elements is that they demark words or works related to the page content, but outside the current context. That is, <blockquote>, <cite> and <q> almost always contain content from other people.

关于这三个元素,最重要的要记住的是,它们标记与页面内容相关的单词或作品,但不在当前上下文范围内 。 也就是说, <blockquote><cite><q> 几乎总是包含来自其他人的内容

块引用 (Blockquote)

A <blockquote> element contains an extended quotation as a block element. For example:

<blockquote>元素包含扩展引用作为block元素 。 例如:

<blockquote>
“To teach how to live without certainty, and yet without being 
paralyzed by hesitation, is perhaps the chief thing that philosophy, 
in our age, can still do for those who study it.”
</blockquote>

A few things to note:

注意事项:

  • The <blockquote> element does not automatically create quotation marks around its content: if you need them, you must add them yourself, either as characters, HTML entities, or generated content.

    <blockquote>元素不会自动在其内容周围创建引号:如果需要它们,则必须自己添加它们,无论是字符HTML实体还是生成的内容

  • By default, <blockquote> pushes its content in from the left and right when displayed in a browser. For this reason, it is often used as a general “indentation” code. Needless to say, you shouldn’t do this: if you want to control indentation on an element, simply apply margin-left via , not a <blockquote> tag.

    默认情况下, <blockquote>在浏览器中显示时从左和右推入其内容。 因此,它通常用作通用的“缩进”代码。 不用说,您不应该这样做:如果要控制元素的缩进,只需通过而不是<blockquote>标记应用margin-left即可。

  • <blockquote> can be used to quote text content that is already on the page, in the form of a pullquote.

    <blockquote>可以用来引用页面上已经存在的文本内容(以pullquote的形式)。

  • traditionally <blockquote> required its text content to be surrounded by a <p> tag. This requirement was dropped in HTML5, but the practice is still useful (see below).

    传统上, <blockquote>要求其文本内容用<p>标记包围。 在HTML5中已删除了此要求,但这种做法仍然有用(请参见下文)。

添加信息 (Adding Information)

A blockquote does not automatically attribute its content. You can add this information in several ways: first, as a <cite> attribute.

块引用不会自动归因于其内容。 您可以通过几种方式添加此信息:首先,作为<cite>属性。

<blockquote cite="https://archive.org/stream/westernphilosoph035502mbp/westernphilosoph035502mbp_djvu.txt">
“To teach how to live without certainty, and yet without being 
paralyzed by hesitation, is perhaps the chief thing that philosophy,
in our age, can still do for those who study it.”
</blockquote>

Unfortunately, no browser that I’m aware of currently uses the cite attribute in any practical way.

不幸的是,目前我所知的浏览器还没有以任何实际的方式使用cite属性。

Alternatively, an attribution can be added as a <footer> and / or <cite> element inside the <blockquote>:

或者,可以在<blockquote>中将属性添加为<footer>和/或<cite>元素:

<blockquote>
    <p>“To teach how to live without certainty, and yet without being
     paralyzed by hesitation, is perhaps the chief thing that philosophy, 
     in our age, can still do for those who study it.”</p>
    <footer>
        <p>― Bertrand Russell, A History of Western Philosophy</p>
    </footer>
</blockquote>

Usually the book or author would be surrounded by a hyperlink, allowing the reader to find more information if they wanted to.

通常,这本书或作者都会被超链接包围,从而使读者可以根据需要找到更多信息。

q (q)

Intended for a short, inline quotation that does not require a line break. For example:

适用于不需要换行符简短的嵌入式报价 。 例如:

<p>As Voltaire said: <q>Every man is a creature of the age in which he lives
and few are able to raise themselves above the ideas of the time.</q>

<q> automatically generates the correct opening and closing “curly” quote marks for content in English. Other languages use different conventions, which may not be supported in all browsers. For example, a German quotation:

<q>自动为英语内容生成正确的开始和结束“弯曲”引号。 其他语言使用不同的约定,并非所有浏览器都支持。 例如,德语报价:

<html lang="de">
<p>Wie Goethe sagte: <q>Man sieht nur das, was man weiß.</q>

Should be presented with German quote conventions: Man sieht nur das, was man weiß.. Modern Webkit-based browsers do this correctly, but Firefox currently does not. This can be fixed with a style declaration:

应该用德语引号引起来: Man sieht nur das,是manweiß。 。 基于现代Webkit的浏览器可以正确地执行此操作,但是Firefox当前不能。 这可以通过样式声明来解决:

:lang(de) > q { quotes: "„" "“" "‚" "‘" }

You can find the quotation conventions for other languages on Wikipedia. Many thanks to Gunnar Bittersmann for pointing out this exception.

您可以在Wikipedia上找到其他语言引用约定 。 非常感谢Gunnar Bittersmann 指出这个例外

Two notes:

两个注意事项:

  • it’s important to remember that <q> is intended for outside sources: it shouldn’t be used to denote general dialogue on a page, turns of phrase, etc.

    重要的是要记住, <q>是供外部来源使用的:不应用于表示页面上的常规对话,短语轮换等。

  • As with <blockquote>, cite can be used as an attribute in the <q> tag to provide a URL for more information.

    <blockquote>cite可以用作<q>标记中的属性,以提供更多信息的URL。

引用 (cite)

Rather confusingly, cite is one of the few words in HTML that is both an attribute and a tag. As an element, it is used a reference to a creative work, such as a book, movie, television show, stage production, music album, or software application. (<cite> might be also be used with microdata to provide more information about a work.)

令人困惑的是, cite是HTML中为数不多的既是属性是标签的单词之一。 作为元素,它被用作对创造性作品引用 ,例如书籍,电影,电视节目,舞台作品,音乐专辑或软件应用程序。 ( <cite>还可与微数据一起使用,以提供有关作品的更多信息。)

<p>Like many thick tomes, <cite>Atlas Shrugged</cite> exists on the 
shelf of most readers as a book to be bragged about, rather than one to 
be read or analysed.

Visually, <cite> italicizes the text content within it, although it should never be used for solely that purpose (use <em> or <i> instead). <cite> contains the name of a work, author, referenced URL (when it is made visible, rather than as the href value of a link). For our first example, <cite> could be used this way:

在视觉上, <cite>斜体显示其中的文本内容,尽管绝不能将其仅用于此目的(而应使用<em><i> )。 <cite>包含作品 ,作者,引用的URL的名称(在可见时,而不是在链接的href值中)。 对于我们的第一个示例, <cite>可以这样使用:

<blockquote>
    <p>“To teach how to live without certainty, and yet without being
     paralyzed by hesitation, is perhaps the chief thing that philosophy, 
     in our age, can still do for those who study it.”</p>
    <footer>
        <p>― Bertrand Russell, 
        <cite>A History of Western Philosophy</cite></p>
    </footer>
</blockquote>

结论 (Conclusion)

The <blockquote>, <cite> and <q> elements are very useful… especially if they are used for the purposes for which they were intended. Together with the other HTML writing elements, you have a full and rich set of markup elements with which to start treating your content.

<blockquote><cite><q>元素非常有用……尤其是当它们用于其预期目的时。 与其他HTML编写元素一起,您将拥有一组完整而丰富的标记元素,可用于开始处理您的内容。

翻译自: https://thenewcode.com/4/In-Other-Words-Using-the-blockquote-cite-and-q-elements

多个blockquote

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值