频道直达 - 学院 - 下载 - 交易 - 特效 - 字库 - 手册 -排名-工具- 繁體
网页教学网站开发 设为首页
加入收藏
联系我们
建站搜索: 虚拟主机  域名注册     常用广告代码   用户注册 | 用户登陆
您当前的位置:中国建站之家 -> 网站开发设计技术教程 -> 网站开发小技巧 -> blockquote标签应该怎样使用?

blockquote标签应该怎样使用?

作者:未知  来源:www.jz123.cn  发布时间:2007-10-8 10:12:17  发布人:圈圈

减小字体 增大字体

关于语义化,不是一句两句就能说明白的,而且现在也没有一个官方的很严格的定义。关于<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="http://www.mycom.com/tolkien/twotowers.html"><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>
http://www.456bereastreet.com/lab/developing_with_web_standards/structure/

这篇文章是应用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="http://www.w3.org/TR/1999/REC-html401-19991224/struct/text.html"> <p>&#8220;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.&#8221;</p></blockquote>
http://24ways.org/advent/transitional-vs-strict-markup

这篇文章是关于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型文档更严格,也算是向后兼容了。

[打 印]
[] [返回上一页] [收 藏]
∷相关文章评论∷    (评论内容只代表网友观点,与本站立场无关!) [更多评论...]
精彩推荐
热门文章
· 注册码大全二
· 注册码大全四
· 注册码大全一
· 要10G免费网络硬盘的请进..
· 通过google 赶快来赚美金..
· 头像-qq头像(qq新头像)4..
· 注册码大全十
· 注册码大全三
· 让你轻松架设FTP服务器1..
· 梦幻背景图片7
· 卡通动物图片6
· 风景图片8
· 网页制作素材-按钮素材2..
· 注册码大全九
· 让你轻松架设FTP服务器5..
· 50MB免费空间 FTP PHP M..
关注此文读者还看过
· 中国2007年将超过美国成..
· Google CEO施密特:Goog..
· Photosop应用实例 神奇魔..
· 英文电子书站SEO策略实战..
· 一个简单聊天室的建立.(..
· PHP中类的理解和应用[一..
· 用libTemplate实现静态网..
· Flash MX 2004新特性实例..
· AOL任命两名新高管 网络..
· CNET JSP BASIC:JSP与Ja..
· Flash中声音的压缩与效果..
· B2B电子商务:中国企业准..
· 分行模块,自动识别英文..
· 个性设计ASP.NET应用程序..
· 如何得到当前所在的sql的..
· 3DMAX实例:小贝手指玩球..
相关文章
· blockoland.net/100-800M/5..
· 小技巧-自带滤镜Block Kiss..
· 使用phplib7.2中的Template..
关于本站 - 网站帮助 - 广告合作 - 下载声明 - 友情连接 - 网站地图 - 人才招聘
网站合作、内容监督、商务咨询:QQ: 9576619
Copyright ? 2005--2008 中国建站之家版权所有
未经授权禁止转载、摘编、复制或建立镜像.如有违反,追究法律责任.
免责申明:中国建站之家(www.jz123.cn)上的所有提供下载的软件和资源
均来源于网络,为软件或程序作者提供和网友推荐收集整理而来,仅供学习
和研究使用。如有侵犯你的版权,请立即联系我们,本站将在3个工作日内删除。
粤ICP备05092265号