blockquote标记应用注意_HTML/Xhtml_网页制作

php中文网
发布: 2016-05-16 16:45:59
原创
2048人浏览过

关于语义化,不是一句两句就能说明白的,而且现在也没有一个官方的很严格的定义。关于
没有争议的是: 1.引用一段较长的文字 2.可以使用cite标签或者属性 问题是引用的文字必须使用块级元素将他包含吗? 首先是来自W3C的解释 9.2.2 Quotations: The BLOCKQUOTE and Q elements -- %coreattrs, %i18n, %events -- cite %URI; #IMPLIED -- URI for source document or msg -- > -- 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 ugly slot; the sweet grass 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. Note that text is not allowed directly inside a
element – it must be contained in an element, usually a

element.
example:

“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.”


http://24ways.org/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
所以,我认为,在strict型必须用块级元素将引用文字包含,而在非strict型中就不必了,但是建议这样这样做,因为strict型文档更严格,也算是向后兼容了。
HTML速学教程(入门课程)
HTML速学教程(入门课程)

HTML怎么学习?HTML怎么入门?HTML在哪学?HTML怎么学才快?不用担心,这里为大家提供了HTML速学教程(入门课程),有需要的小伙伴保存下载就能学习啦!

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号