blockquote標記應用注意_HTML/Xhtml_網頁製作

WBOY
發布: 2016-05-16 16:45:59
原創
1516 人瀏覽過

關於語意化,不是一句兩句就能說明白的,而且現在也沒有一個官方的很嚴格的定義。關於
沒有爭議的是:
1.引用一段較長的文字
2.可以使用cite標籤或屬性
問題是
引用的文字必須使用區塊級元素將他包含嗎?
首先是來自W3C的解釋
9.2.2 Quotations: The BLOCKQUOTE and Q elements -- %coreattrs, %i18n, %events -- cite
-- %coreattrs, %i18n, %events -- cite
%URI; -- short inline quotation --> -- %coreattrs, % i18n, %events -- cite
%URI;
#IMPLIED -- URI for source document or msg -- >
這兩個便條指名包含的內容為引用文字. BLOCKQUOTE 用於長文字的引用(block-level content) 而 Q 用於短文字的引用(inline content) 且不允許引用的句子不完整。
這個例子的文字來自 "The Two Towers", 作者 J.R.R. Tolkien, 最為引用文字.

They went in single file, running like hounds on a strong scent,and an eager light was in their eyes. Nearly due west the broad swath of the marching Orcs tramped its swly of Rohan had been bruised and blackened as they passed.


這篇文章是應用web標準進行開發,裡面提到了關於一些TAGS的語意下面摘錄的是

For longer quotations that form one or more paragraphs, the
element should be used. CSS can then be used to style the quotation. 附註in an element, usually a
element.

Example:

「The following sections discuss issues surrounding the structuring of text. Elements that present text ) are discussed elsewhere in the specification. For information about characters, please consult the section on the document character set.”

http://24ways.org/advent/transal-vt
這篇文章是關於transitional-vs-strict,過渡型和標準型xhtml的區別,裡面提到了內容模型的區別,有關於
的內容,在strict中,引用的內容必須使用區塊級元素將其包含,通常是
,

中。

Content model differences
An element type's content model describes what may be contained by an instance of the element type. The most important difference in content models between Transitional and Seletrict is that blockquoteence in content on formly. examples:
text and images are not allowed immediately inside the body element, and need to be contained in a block level element like p or div
input elements must not be direct descendants of a formel. must be wrapped in a block level element like p or div
所以,我認為,在strict型必須用塊級元素將引用文字包含,而在非strict型中就不必了,但是建議這樣這樣做,因為strict型文檔更嚴格,也算是向後兼容了。
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
最新問題
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!