关注HTML 5.0

8月10号,W3C小组发布了HTML5.0的最新草案,再次引起关注。

不久前,就是7月22号的草案,介绍了html5.0 在 html4.0的基础上做出的改变,增加一些新的元素和标签。比如:

  • section represents a generic document or application section. It can be used together with h1-h6 to indicate the document structure.
  • article represents an independent piece of content of a document, such as a blog entry or newspaper article.
  • aside represents a piece of content that is only slightly related to the rest of the page.
  • header represents the header of a section.
  • footer represents a footer for a section and can contain information about the author, copyright information, et cetera.
  • nav represents a section of the document intended for navigation.

  • 更多的变化可参考http://www.ibm.com/developerworks/xml/library/x-html5/
    在一些典型的博客页面的源码中,我们可以看到这样的代码:<div id=”header”> <div class=”entry”> <div id=”footer”>,现在可以使用<header> <article> <footer>等标签来代替了。这样编写确实很方便,而且提高了代码的可读性。CSS也有一些相应的变化。

    但是这些标准什么时候才能被采用呢?这肯定不是一时半会儿的事。尤其是IE浏览器横行天下,却从来没有按标准行事。IE7.0已经出来了,我用过一段时间,又卸载了,觉得IE7.0还不如firefox好用。希望IE8.0能够好一些,开发小组应该多考虑HTML5.0 和cCSS3.0的标准。毕竟html+css已经非常成熟,极大地净化了网页代码,而且很容易上手。

    参考:8月10号草案 (W3C Editor’s Draft 10 August 2007): http://dev.w3.org/html5/spec/Overview.html
    HTML5 与 HTML 4 的不同(HTML 5 differences from HTML 4): http://dev.w3.org/html5/html4-differences/Overview.html

    , ,
    Trackback

    本文到目前为止还暂无回复

    添加回复