HTML5(10)——引用

q元素是用于较短的文本引用

一般在HTML中,就使用<q>来进行短引文,它一般是行内引用,浏览器会解析为双引号。

1
2
<p>WWF's goal is to: <q>Build a future where people live in
harmony with nature.</q></p>

双引号引用起来

blockquote元素是用来引用长文本

HTML中,长文本的引用使用<blockquote>元素来进行引用,是块引用,浏览器会解析为缩进。

1
2
3
4
5
6
7
8
9
<p>Browsers usually indent blockquote elements.</p>

<blockquote cite="http://www.worldwildlife.org/who/index.html">
For 50 years, WWF has been protecting the future of nature.
The world's leading conservation organization,
WWF works in 100 countries and is supported by
1.2 million members in the United States and
close to 5 million globally.
</blockquote>

缩进引用

HTML缩写

在网页中,很多时候我们都需要用到缩写,将一长串的词缩写成大写字母。’‘元素就是用来干这样的事情的,将鼠标放在缩写词上,会悬浮出现完整的词。其中title属性是用来放完整的词。

1
<p>The <abbr title="World Health Organization">WHO</abbr> was founded in 1948.</p>

联系信息元素引用

<address>元素是用来引用个人联系方式,地址等联系信息。浏览器解析为斜体。

1
2
3
4
5
6
7
<address>
Written by John Doe.<br>
Visit us at:<br>
Example.com<br>
Box 564, Disneyland<br>
USA
</address>

联系信息

作品名字引用

HTML中,<cite>元素就是专门用来引用作品名字,也是解析为斜体。

1
<p><cite>The Scream</cite> by Edvard Munch. Painted in 1893.</p>

斜体

bdo元素用来双向覆盖

一般<bdo>元素就是用来覆盖当前文本的方向。dir元素是用来指定书写方向的。

1
2
3
<p>If your browser supports bi-directional override (bdo), the next line will be written from right to left (rtl):</p>

<bdo dir="rtl">This line will be written from right to left</bdo>

完全就是从右到左

坚持原创技术分享,您的支持将鼓励我继续创作!