仓酷云

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 1092|回复: 8
打印 上一主题 下一主题

[HTML5] 来谈谈:blockquote标签

[复制链接]
蒙在股里 该用户已被删除
跳转到指定楼层
楼主
发表于 2015-1-15 22:28:59 | 显示全部楼层 回帖奖励 |倒序浏览 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
Resig在2008年在其博客中介绍过HTML5的data-属性,现如今HTML5在如火如荼地推广,似乎国内的技术有些延迟,这篇博文可以在这里找到。关于语义化,不是一句两句就可以申明白的,并且如今也没有一个官方的很严厉的界说。关于<blockquote>没有争议的是:
1.援用一段较长的笔墨
2.可使用cite标签大概属性
成绩是<blockquote>援用的笔墨必需利用块级元素将他包括吗?
起首是来自W3C的注释
9.2.2Quotations:TheBLOCKQUOTEandQelements<!ELEMENTBLOCKQUOTE--(%block;|SCRIPT)+--longquotation--><!ATTLISTBLOCKQUOTE%attrs;
--%coreattrs,%i18n,%events--cite
%URI;
#IMPLIED--URIforsourcedocumentormsg--><!ELEMENTQ--(%inline;)*
--shortinlinequotation--><!ATTLISTQ%attrs;
--%coreattrs,%i18n,%events--cite
%URI;
#IMPLIED--URIforsourcedocumentormsg-->
这两个便签指名包括的内容为援用笔墨.BLOCKQUOTE用于长笔墨的援用(block-levelcontent)而Q用于漫笔字的援用(inlinecontent)且不同意援用的句子不完全。
这个例子的笔墨来自"TheTwoTowers",作者J.R.R.Tolkien,最为援用笔墨.<BLOCKQUOTEcite="http://www.mycom.com/tolkien/twotowers.html"><P>Theywentinsinglefile,runninglikehoundsonastrongscent,andaneagerlightwasintheireyes.NearlyduewestthebroadswathofthemarchingOrcstrampeditsuglyslot;thesweetgrassofRohanhadbeenbruisedandblackenedastheypassed.</P></BLOCKQUOTE>
http://www.456bereastreet.com/lab/developing_with_web_standards/structure/
这篇文章是使用web尺度举行开辟,内里提到了关于一些TAGS的语义上面摘录的是<blockquote>
Forlongerquotationsthatformoneormoreparagraphs,the<blockquote>elementshouldbeused.CSScanthenbeusedtostylethequotation.Notethattextisnotalloweddirectlyinsidea<blockquote>element&ndash;itmustbecontainedinanelement,usuallya<p>element.
Example:<blockquotecite="http://www.w3.org/TR/1999/REC-html401-19991224/struct/text.html"><p>“Thefollowingsectionsdiscussissuessurroundingthestructuringoftext.Elementsthatpresenttext(alignmentelements,fontelements,stylesheets,etc.)arediscussedelsewhereinthespecification.Forinformationaboutcharacters,pleaseconsultthesectiononthedocumentcharacterset.”</p></blockquote>
http://24ways.org/advent/transitional-vs-strict-markup
这篇文章是关于transitional-vs-strict,过渡型和尺度型xhtml的区分,内里提到了内容模子的区分,有关于<blockquote>的内容,在strict中,援用的内容必需利用块级元素将其包括,一般是<p>,<div>中。
Contentmodeldifferences
Anelementtype’
12下一页


WHATWG版和W3C版的HTML5规范虽然根源相同,在一些领域却已经产生分歧。
蒙在股里 该用户已被删除
沙发
 楼主| 发表于 2015-1-15 23:52:32 | 显示全部楼层

来谈谈:blockquote标签

通过大家的心得,或许能找出"怎么学html5"这个问题的答案。另,我会不定期把群里面关于技术的讨论贴到本帖,敬请关注。scontentmodeldescribeswhatmaybecontainedbyaninstanceoftheelementtype.ThemostimportantdifferenceincontentmodelsbetweenTransitionalandStrictisthatblockquote,body,andformelementsmayonlycontainblocklevelelements.Afewexamples:</p>textandimagesarenotallowedimmediatelyinsidethebodyelement,andneedtobecontainedinablocklevelelementlikepordiv
inputelementsmustnotbedirectdescendantsofaformelement
textinblockquoteelementsmustbewrappedinablocklevelelementlikepordiv
以是,我以为,在strict型必需用块级元素将援用笔墨包括,而在非strict型中就不用了,可是倡议如许如许做,由于strict型文档更严厉,也算是向后兼容了。
</p>
上一页12


HTML5语音识别(现在一般用在搜索上),目前相关介绍还是挺多的。为何呢?因为很简单!
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|仓酷云 鄂ICP备14007578号-2

GMT+8, 2024-5-14 21:43

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表