摘要
HTML <blockquote> 元素(HTML 區塊引言元素)定義一段文字屬於引用。通常,這元素會透過縮排來呈現(要知道如何改變,請參考備註)。引言的 URL 來源可透過 cite 屬性賦予,而來源的文本形式可以使用 <cite> 元素。
| 內容類別 | 流內容、sectioning root、捫及內容。 |
|---|---|
| 允許內容 | 內容流. |
| Tag 省略 | None, both the starting and ending tag are mandatory. |
| 允許父元素 | 任何允許內容流的元素 |
| DOM 介面 | HTMLQuoteElement |
屬性
這個屬性包含全局屬性。
cite- 一個指向被引用的原始文件或訊息的 URL 。這個屬性預期要指引到解釋內容的資訊,或是引言的援引。
範例
<blockquote cite="https://developer.mozilla.org"> <p>這是取自於 Mozilla Developer Center 的引言。</p> </blockquote>
以上的 HTML 原始碼會輸出:
這是取自於 Mozilla Developer Center 的引言。
規範
| 規範 | 狀態 | 註解 |
|---|---|---|
| WHATWG HTML Living Standard The definition of '<blockquote>' in that specification. |
Living Standard | |
| HTML5 The definition of '<blockquote>' in that specification. |
Recommendation | |
| HTML 4.01 Specification The definition of '<blockquote>' in that specification. |
Recommendation |
瀏覽器相容性
| 特徵 | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| 基本支援 | (Yes) | 1.0 (1.7 or earlier) | (Yes) | (Yes) | (Yes) |
| 特徵 | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|
| 基本支援 | (Yes) | 1.0 (1.0) | (Yes) | (Yes) | (Yes) |
備註
要改變<blockquote>的縮進,請使用 CSS 的 margin 屬性。
針對短篇引文請使用 <q> 元素。