2009-6-23 查看次数:0
达到W3C的XHTML 1.0标准,其实不难,只要到http://validator.w3.org/去验证一下,按提示改就行了
不过内容就不好控制了,有些在线编辑器输出的代码标记不符合标准,你一增加内容就会报错
The document located at <http://www.goodtext.org/> was successfully checked as XHTML 1.0 Transitional. This means that the resource in question identified itself as "XHTML 1.0 Transitional" and that we successfully performed a formal validation using an SGML, HTML5 and/or XML Parser(s) (depending on the markup language used).
"valid" Icon(s) on your Web page
To show your readers that you have taken the care to create an interoperable Web page, you may display this icon on any page that validates. Here is the HTML you could use to add this icon to your Web page:
<p> <a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Transitional" height="31" width="88" /></a> </p>
<p> <a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10-blue" alt="Valid XHTML 1.0 Transitional" height="31" width="88" /></a> </p>
A full list of icons, with links to alternate formats and colors, is available: If you like, you can download a copy of the icons to keep in your local web directory, and change the HTML fragment above to reference your local image rather than the one on this server.
Linking to this result
If you would like to create a link to this page (i.e., this validation result) to make it easier to revalidate this page in the future or to allow others to validate your page, the URI is <http://validator.w3.org/check?uri=http%3A%2F%2Fwww.goodtext.org%2F> (or you can just add the current page to your bookmarks or hotlist).
Validating CSS Style Sheets
If you use CSS in your document, you can check it using the W3C CSS Validation Service.
W3C将XHTML 1.0分为三种规范:Strict(严格)、Transitional(过渡)和Frameset(框架)。
XHTML 1.0 Strict(严格)
XHTML 1.0 Strict是需求最苛刻的XHTML规范,但是它提供了最干净的结构化标记。Strict编码独立于任何定义外观的标记语言。它使用层叠样式表(CSS)来控制表示外观。这种与表示相独立的结构使得XHTML Strict能够相当灵活地在不同的设备上显示。而其控制和表示对于CSS的依赖对于程序员来说又是一个麻烦,因为如果想要在那些不能识别样式表的设备或浏览器中显示Web内容,它并不是一个好的选择。
XHTML 1.0(过渡)
XHTML 1.0 Transitional是更加宽容的规范。Strict完全将结构与表示分离,而Transitional允许使用标签来控制外观。它的目的是要在允许用标记来控制表示的HTML页面和二者完全分离的XHTML Strict之间架起桥梁。它最大的好处是克服了Strict对于CSS的依赖。Transitional页面对于使用旧式浏览器或不能识别样式表的用户来说也是可以访问的。
XHTML 1 .0 标准是兼容 HTML 4.01,是个不错的协议,可以让开发者在编写代码的同时通过一些工具来检查代码的合法性,虽然对于用户而言,制作出来的网页和 HTML 4.01 相比实在没有什么不同。对于你写新的网页来说,使用 XHTML 1.0 还是一个不错的选择。
XHTML 1.1 标准要求浏览器不再支持原先的容错能力,这是一个标准制定者走火入魔的典型例子,这个标准从学术上说非常纯净,但是对于浏览器而言,则是个呆板、笨拙、不可理喻的标准。所以目前所有由人类开发的浏览器都没有遵照所谓纯净的 XHTML 1.1的标准,你的代码只要浏览器能读懂,他都会很好的显示出来,而不跳出弹框报错。
不知道什么时候又会报错,现在是通过了,先不管了。