📅  最后修改于: 2023-12-03 15:31:17.051000             🧑  作者: Mango
在 HTML 中,引用元素用于引用其他资源或引述其他文本。它们包括:<blockquote>
、<q>
、<cite>
、<dfn>
、<abbr>
和 <address>
。
<blockquote>
<blockquote>
标签用于引用长段落,通常使用缩进或对其方式来标记引用部分。它的属性有 cite
,用于指定引用来源的 URL。
> Here is some quoted text. This is the first paragraph of the quote.
>
> This is the second paragraph of the quote.
<blockquote>
<p>Here is some quoted text. This is the first paragraph of the quote.</p>
<p>This is the second paragraph of the quote.</p>
</blockquote>
<q>
<q>
标签用于引用文章中的短语或单词。它会自动添加引号字符。
In Shakespeare's play Hamlet, he said, <q>"To be or not to be."</q>
<p>In Shakespeare's play Hamlet, he said, <q>"To be or not to be."</q></p>
<cite>
<cite>
标签用于表示作品的标题(例如书籍、剧本、歌曲)。它的属性有 title
,用于指定作品的标题。
The Beatles recorded an album called <cite title="Revolver">Revolver</cite> in 1966.
<p>The Beatles recorded an album called <cite title="Revolver">Revolver</cite> in 1966.</p>
<dfn>
<dfn>
标签用于定义术语。它的属性有 title
,用于提供更详细的定义。
In computer science, a <dfn title="Central Processing Unit">CPU</dfn> is the primary component of a computer system.
<p>In computer science, a <dfn title="Central Processing Unit">CPU</dfn> is the primary component of a computer system.</p>
<abbr>
<abbr>
标签用于指定缩写词或首字母缩写,在鼠标悬浮在文本上时显示完整的解释。
I am going to the <abbr title="Supermarket">SMT</abbr> today.
<p>I am going to the <abbr title="Supermarket">SMT</abbr> today.</p>
<address>
<address>
标签用于表示文档或文章的联系信息。它通常包含作者、电话号码和电子邮件地址。浏览器会自动添加斜体样式。
<address>
Written by John Doe.<br>
Visit us at:<br>
Example.com<br>
Box 564, Disneyland<br>
USA
</address>
<address>
Written by John Doe.<br>
Visit us at:<br>
Example.com<br>
Box 564, Disneyland<br>
USA
</address>
总之,HTML 中的引用元素可以帮助您更好地标记文档的部分内容,并更好地解释自己的意图。