blockquote标志应用留意
发布时间:2020-03-16 15:44:04 所属栏目:编程 来源:站长网
导读:关于语义化,不是一句两句就能说大白的,并且此刻也没有一个官方的很严酷的界说。关于blockquote没有争议的是: 1.引用一段较长的笔墨 2.可以行使cite标签可能属性 题目是blockquote引用的笔墨必需行使块级元素将他包括吗? 起首是来自W3C的表明 9.2.2 Quo
关于语义化,不是一句两句就能说大白的,并且此刻也没有一个官方的很严酷的界说。关于<blockquote>没有争议的是: 1.引用一段较长的笔墨 2.可以行使cite标签可能属性 题目是<blockquote>引用的笔墨必需行使块级元素将他包括吗? 起首是来自W3C的表明 9.2.2 Quotations: The BLOCKQUOTE and Q elements<!ELEMENT BLOCKQUOTE - - (%block;|SCRIPT) -- long quotation --><!ATTLIST BLOCKQUOTE %attrs; -- %coreattrs, %i18n, %events -- cite %URI; #IMPLIED -- URI for source document or msg -- ><!ELEMENT Q - - (%inline;)* -- short inline quotation --><!ATTLIST Q %attrs; -- %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, 最为引用笔墨. <BLOCKQUOTE cite=""><P>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.</P></BLOCKQUOTE> 这篇文章是应用web尺度举办开拓,内里提到了关于一些TAGS的语义下面摘录的是<blockquote> For longer quotations that form one or more paragraphs, the <blockquote> element should be used. CSS can then be used to style the quotation. Note that text is not allowed directly inside a <blockquote> element – it must be contained in an element, usually a <p> element. Example:<blockquote cite=""> <p>“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.”</p></blockquote> 这篇文章是关于transitional-vs-strict,过渡型和尺度型xhtml的区别,内里提到了内容模子的区别,有关于<blockquote>的内容,在strict中,引用的内容必需行使块级元素将其包括,凡是是<p>,<div>中。 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 以是,我以为,在strict型必需用块级元素将引用笔墨包括,而在非strict型中就不必了,可是提议这样这样做,由于strict型文档更严酷,也算是向后兼容了。 (编辑:湖南网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
站长推荐
热点阅读