blockquote标签应该怎样使用?

blockquote标签应该怎样使用?


2024年7月4日发(作者:)

关于语义化,不是一句两句就能说明白的,而且现在也没有一个官方的很严格的定义。

关于

没有争议的是:

1、引用一段较长的文字

2、可以使用cite标签或者属性

问题是

引用的文字必须使用块级元素将他包含吗?

首先是来自W3C的解释

以下为引用的内容:

9.2.2 Quotations: The BLOCKQUOTE and Q elements

- - (%block;|SCRIPT)+ -- long quotation -->

-- %coreattrs, %i18n, %events -- cite

%URI;

#IMPLIED -- URI for source document or msg -- >

(%inline;)*

-- 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, 最为引用文

字.

cite="/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 ugly slot; the

sweet grass of Rohan had been bruised and blackened as they

passed.

/lab/developing_with_web_standards/structur

e/

这篇文章是应用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. Note that

text is not allowed directly inside a

element – it must be contained

in an element, usually a

element.

Example:

cite="/TR/1999/REC-html401-19991224/struct/">

“The following sections discuss issues surrounding the structuring of

text. Elements that present text (alignment elements, font elements, style sheets,

etc.) are discussed elsewhere in the specification. For information about characters,

please consult the section on the document character

set.”

/advent/transitional-vs-strict-markup

这篇文章是关于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 Strict is that blockquote, body, and form elements may

only contain block level elements. A few 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 form element

text in blockquote elements must be wrapped in a block level element like p or

div


发布者:admin,转转请注明出处:http://www.yc00.com/web/1720059798a2759796.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信