<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>我们的故事 &#187; w3c</title>
	<atom:link href="http://blog.ihandu.com/tag/w3c/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ihandu.com</link>
	<description>i Hand u - dUcky&#039;s Blog</description>
	<lastBuildDate>Sat, 13 Aug 2011 04:21:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>手机网站开发笔记2 &#8211; 完整的头部声明</title>
		<link>http://blog.ihandu.com/2010/04/mobile-website-step2/</link>
		<comments>http://blog.ihandu.com/2010/04/mobile-website-step2/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 02:48:28 +0000</pubDate>
		<dc:creator>dUcky</dc:creator>
				<category><![CDATA[工作]]></category>
		<category><![CDATA[w3c]]></category>
		<category><![CDATA[web标准化]]></category>
		<category><![CDATA[xhtml]]></category>
		<category><![CDATA[xhtml mp]]></category>
		<category><![CDATA[手机]]></category>
		<category><![CDATA[手机网站开发]]></category>

		<guid isPermaLink="false">http://blog.ihandu.com/?p=535</guid>
		<description><![CDATA[接上一篇概述，说一说手机网站网页的头部声明。 1 2 3 4 5 6 7 8 9 10 &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!DOCTYPE html PUBLIC &#34;-//WAPFORUM//DTD XHTML Mobile 1.0//EN&#34; &#34;http://www.wapforum.org/DTD/xhtml-mobile10.dtd&#34;&#62; &#60;html xmlns=&#34;http://www.w3.org/1999/xhtml&#34;&#62; &#60;head&#62; &#60;meta http-equiv=&#34;Content-Type&#34; content=&#34;application/vnd.wap.xhtml+xml;charset=utf-8&#34; /&#62; &#60;meta http-equiv=&#34;Cache-Control&#34; content=&#34;must-revalidate,no-cache&#34; /&#62; &#60;meta name=&#34;viewport&#34; content=&#34;width=device-width;initial-scale=1.0;maximum-scale=2.0;user-scalable=1&#34; /&#62; &#60;title&#62;我们的故事 iHandu.com - dUcky&#60;/title&#62; &#60;link href=&#34;style/mobile.css&#34; rel=&#34;stylesheet&#34; type=&#34;text/css&#34; /&#62; &#60;/head&#62; 上面的代码就是一个完整的手机网页的头部，解释几个比较特别的： line 1: xml 的声明并不是必要的，但是听说会影响某些 wap 浏览器，比如 Sony [...]]]></description>
			<content:encoded><![CDATA[<p>接<a href="http://blog.ihandu.com/2010/04/mobile-website-step1/" target="_blank">上一篇概述</a>，说一说手机网站网页的头部声明。</p>

<div class="wp_codebox"><table><tr id="p5352"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code" id="p535code2"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?</span>xml version<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;1.0&quot;</span> encoding<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;utf-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #339933;">&lt;!</span>DOCTYPE html <span style="color: #000000; font-weight: bold;">PUBLIC</span> <span style="color: #0000ff;">&quot;-//WAPFORUM//DTD XHTML Mobile 1.0//EN&quot;</span> <span style="color: #0000ff;">&quot;http://www.wapforum.org/DTD/xhtml-mobile10.dtd&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>html xmlns<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://www.w3.org/1999/xhtml&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>head<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>meta http<span style="color: #339933;">-</span>equiv<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Content-Type&quot;</span> content<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;application/vnd.wap.xhtml+xml;charset=utf-8&quot;</span> <span style="color: #339933;">/&gt;</span>
<span style="color: #339933;">&lt;</span>meta http<span style="color: #339933;">-</span>equiv<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Cache-Control&quot;</span> content<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;must-revalidate,no-cache&quot;</span> <span style="color: #339933;">/&gt;</span>
<span style="color: #339933;">&lt;</span>meta name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;viewport&quot;</span> content<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;width=device-width;initial-scale=1.0;maximum-scale=2.0;user-scalable=1&quot;</span> <span style="color: #339933;">/&gt;</span>
<span style="color: #339933;">&lt;</span>title<span style="color: #339933;">&gt;</span>我们的故事 iHandu<span style="color: #339933;">.</span>com <span style="color: #339933;">-</span> dUcky<span style="color: #339933;">&lt;/</span>title<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>link href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;style/mobile.css&quot;</span> rel<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;stylesheet&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text/css&quot;</span> <span style="color: #339933;">/&gt;</span>
<span style="color: #339933;">&lt;/</span>head<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>上面的代码就是一个完整的手机网页的头部，解释几个比较特别的：</p>
<p><strong>line 1:</strong> <strong>xml 的声明并不是必要的</strong>，但是听说<strong>会影响某些 wap 浏览器</strong>，比如 Sony Ericsson 的一些型号，“ 当接收到的 MIME 类型为 text/html 时, 会利用 XML 声明来区分 XHTML MP 和 IHTML（一个 NTT DoCoMo 定义的有专利的标记语言）文档；如果文档包含 XML 声明，它就是一个 XHTML MP 文档，否则它就是一个 IHTML 文档。”</p>
<p><strong>line 2:</strong> 定义 DTD 的名字，声明了使用 XHTML Mobile 1.0 为内容格式。</p>
<p><span id="more-535"></span><strong>line 5:</strong> “由OMA 定义的 XHTML MP 内容的首选 MIME 类型为：‘application/vnd.wap.xhtml+xml’ 。这一类型可以用于向 XHTML 用户代理提供 XHTML MP 文档支持。另外，也可使用  ‘application/xhtml+xml’ 。<strong>在一些 Symbian Series 60 浏览器上</strong>，<strong>必须使用</strong> MIME 类型 ‘application/vnd.wap.xhtml+xml’ 以确保正确的 XHTML MP 内容视图。”</p>
<p><strong>line 6:</strong> 设置浏览器缓存，这里是禁止缓存， must-revalidate 是针对某些浏览球通过返回按钮回到上一个标签而不重新装载。</p>
<p><strong>line 7:</strong> 针对 iphone 的设置。<strong>width:</strong> 宽度；<strong>height:</strong> 的高度；<strong>initial-scale:</strong> 初始的缩放比例；<strong>minimum-scale:</strong> 允许用户缩放到的最小比例；<strong>maximum-scale:</strong> 允许用户缩放到的最大比例；<strong>user-scalable:</strong> 用户是否可以手动缩放。</p>
<p>其他都是最基本的，当然<strong>你也可以加上 keywords 或者 description 的 meta 标签</strong>。</p>
<p>（文中一些打双引号引用的文字都来源于网上的资料，但是我找不到源头了，感谢那些分享的人）</p>
<p>最后是 <strong>W3C 提供</strong>的<a href="http://validator.w3.org/mobile/" target="_blank">移动网页使用的 XHTML 验证工具</a>，它会对你做的页面提出建议和不符合标准的地方。</p>
<h4  class="related_post_title">相关文章</h4><ul class="related_post"><li><a href="http://blog.ihandu.com/2010/04/mobile-website-step1/" title="手机网站开发笔记1 &#8211; 概述">手机网站开发笔记1 &#8211; 概述</a></li><li><a href="http://blog.ihandu.com/2010/03/html5-css3/" title="html5 带来了什么？ html5 与 css3">html5 带来了什么？ html5 与 css3</a></li><li><a href="http://blog.ihandu.com/2009/10/5-interesting-apk-android/" title="推荐 Android 上 5 款有趣的应用">推荐 Android 上 5 款有趣的应用</a></li><li><a href="http://blog.ihandu.com/2009/10/android-htc-g2-magic/" title="Android 中的魔术师 HTC G2 Magic">Android 中的魔术师 HTC G2 Magic</a></li><li><a href="http://blog.ihandu.com/2009/02/nokia5800xm/" title="鸟枪换炮 Nokia5800xm">鸟枪换炮 Nokia5800xm</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://blog.ihandu.com/2010/04/mobile-website-step2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>手机网站开发笔记1 &#8211; 概述</title>
		<link>http://blog.ihandu.com/2010/04/mobile-website-step1/</link>
		<comments>http://blog.ihandu.com/2010/04/mobile-website-step1/#comments</comments>
		<pubDate>Tue, 06 Apr 2010 12:03:54 +0000</pubDate>
		<dc:creator>dUcky</dc:creator>
				<category><![CDATA[工作]]></category>
		<category><![CDATA[w3c]]></category>
		<category><![CDATA[web标准化]]></category>
		<category><![CDATA[xhtml]]></category>
		<category><![CDATA[xhtml mp]]></category>
		<category><![CDATA[手机]]></category>
		<category><![CDATA[手机网站开发]]></category>

		<guid isPermaLink="false">http://blog.ihandu.com/?p=523</guid>
		<description><![CDATA[手机网站由于大家都是起步不久，所以网上有用公开的资料并不是很多，特别是国内。下面从头说起。 什么是 wap2.0 ？ wap 是无线应用协议（Wireless Application Protocol）。wap2.0 就是 wap 的第二个版本。 wap1.X 规定无线设备访问的页面是用 WML 语言编写的，但是 WAP2.0 将 XHTML MP 做为主要内容格式。 via 中文 wikipedia 什么是 XHTML MP ？ XHTML MP 是 XHTML 的子集，因此继承了它的语法。用 XHTML MP 构建的页面，以供手持设备的访问，如手机、PDA等。 页头声明： 1 &#60;!DOCTYPE html PUBLIC &#34;-//WAPFORUM//DTD XHTML Mobile 1.0//EN&#34; &#34;http://www.wapforum.org/DTD/xhtml-mobile10.dtd&#34;&#62; XHTML Mobile Profile (XHTML MP) via wikipedia 这样看来，其实与我们平时用的 xhtml 差别不是很大，但是与一般网站用的 [...]]]></description>
			<content:encoded><![CDATA[<p>手机网站由于大家都是起步不久，所以网上有用公开的资料并不是很多，特别是国内。下面从头说起。</p>
<h3>什么是 wap2.0 ？</h3>
<p>wap 是无线应用协议（Wireless Application Protocol）。wap2.0 就是 wap 的第二个版本。<br />
wap1.X 规定无线设备访问的页面是用 WML 语言编写的，但是 WAP2.0 将 <strong>XHTML MP</strong> 做为主要内容格式。<br />
via <a href="http://zh.wikipedia.org/wiki/WAP" target="_blank">中文 wikipedia</a></p>
<h3>什么是 XHTML MP ？</h3>
<p>XHTML MP 是 XHTML 的子集，因此继承了它的语法。用 XHTML MP 构建的页面，以供手持设备的访问，如手机、PDA等。</p>
<p>页头声明：</p>

<div class="wp_codebox"><table><tr id="p5234"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p523code4"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;!</span>DOCTYPE html <span style="color: #000000; font-weight: bold;">PUBLIC</span> <span style="color: #0000ff;">&quot;-//WAPFORUM//DTD XHTML Mobile 1.0//EN&quot;</span> <span style="color: #0000ff;">&quot;http://www.wapforum.org/DTD/xhtml-mobile10.dtd&quot;</span><span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>XHTML Mobile Profile (XHTML MP) via <a href="http://en.wikipedia.org/wiki/XHTML_Mobile_Profile" target="_blank">wikipedia</a></p>
<p>这样看来，其实与我们平时用的 xhtml 差别不是很大，但是<strong>与一般网站用的 xhtml、css、js 还是有很多不一样的地方</strong>，从之前的实践者我们就可以看到。</p>
<p><span id="more-523"></span></p>
<ul>
<li><a href="http://www.fool2fish.cn/?p=290" target="_blank">手机网站开发必修课[1]：手机浏览器</a></li>
<li><a href="http://www.fool2fish.cn/?p=320" target="_blank">手机网站开发必修课[2]：浏览器兼容性测试</a></li>
<li><a href="http://ued.taobao.com/blog/index.php/2010/01/03/手机网站开发必修课2009总结版/" target="_blank">手机网站开发必修课[2009总结版]</a></li>
</ul>
<p>感谢淘宝的设计师以及工程师的分享精神，让我们少走不少路。更提醒我们<strong>兼容性是一个很大的问题</strong>。下面的这张表是在 twitter 上 follow 前端大师 <a href="https://twitter.com/ppk" target="_blank">@ppk</a> 的同学们的手机浏览器环境调查：</p>
<ul>
<li><a href="http://www.quirksmode.org/m/phones.html" target="_blank">Phone types and browsers</a></li>
</ul>
<p>看花了眼吧…所以兼容性从前期规划到后期测试都非常重要。</p>
<p>更多的东西还要在自己的实践中去总结，最后推荐的是：<a href="http://www.quirksmode.org/m/" target="_blank">PPK 关于手机网站开发的研究</a>，以及在蓝色理想找到 <strong>W3C 在移动 web 设计和用户体验的推荐标准</strong>：<a href="http://bbs.blueidea.com/thread-2934269-1-1.html" target="_blank">W3C移动web最佳实践1.0中文版.pdf</a>，叙述了 60 条有关手机网站需要注意的地方。</p>
<h4  class="related_post_title">相关文章</h4><ul class="related_post"><li><a href="http://blog.ihandu.com/2010/04/mobile-website-step2/" title="手机网站开发笔记2 &#8211; 完整的头部声明">手机网站开发笔记2 &#8211; 完整的头部声明</a></li><li><a href="http://blog.ihandu.com/2010/03/html5-css3/" title="html5 带来了什么？ html5 与 css3">html5 带来了什么？ html5 与 css3</a></li><li><a href="http://blog.ihandu.com/2009/10/5-interesting-apk-android/" title="推荐 Android 上 5 款有趣的应用">推荐 Android 上 5 款有趣的应用</a></li><li><a href="http://blog.ihandu.com/2009/10/android-htc-g2-magic/" title="Android 中的魔术师 HTC G2 Magic">Android 中的魔术师 HTC G2 Magic</a></li><li><a href="http://blog.ihandu.com/2009/02/nokia5800xm/" title="鸟枪换炮 Nokia5800xm">鸟枪换炮 Nokia5800xm</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://blog.ihandu.com/2010/04/mobile-website-step1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>html5 带来了什么？ html5 与 css3</title>
		<link>http://blog.ihandu.com/2010/03/html5-css3/</link>
		<comments>http://blog.ihandu.com/2010/03/html5-css3/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 14:46:26 +0000</pubDate>
		<dc:creator>dUcky</dc:creator>
				<category><![CDATA[工作]]></category>
		<category><![CDATA[视角]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[w3c]]></category>
		<category><![CDATA[web标准化]]></category>
		<category><![CDATA[语义化]]></category>

		<guid isPermaLink="false">http://blog.ihandu.com/?p=458</guid>
		<description><![CDATA[html5 已经被热议了很久，什么是 html5 以及它发展的情况不去赘述，要强调的是 html5 工作组得到了 Apple 以及 Google 两巨头的支持。详细可以查看维基百科关于 html5 的描述。 html5 的标签 与 html4 或者 xhtml1 相比，html5 带来了新的标签，废弃了一些旧的。举个例子，现在我们写一个普通的新闻页面里 &#60;body&#62; 的内容是： 1 2 3 4 5 6 7 8 9 10 11 12 13 &#60;div id=&#34;header&#34;&#62;ihandu.com 我们的故事&#60;/div&#62; &#160; &#60;div class=&#34;content&#34;&#62; &#60;div class=&#34;news&#34;&#62; &#60;h1&#62;dUcky的blog: ihandu.com 我们的故事&#60;/h1&#62; &#60;div class=&#34;detail&#34;&#62; &#60;p&#62;i,dUcky&#60;/p&#62; &#60;p&#62;Bio:交互设计 前端 Gfans html5 带来了什么？ html5 [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.ihandu.com/wp-content/uploads/2010/03/html5.gif" alt="html5" title="html5" /></p>
<p>html5 已经被热议了很久，什么是 html5 以及它发展的情况不去赘述，要强调的是 html5 工作组得到了 Apple 以及 Google 两巨头的支持。详细可以查看<a href="http://en.wikipedia.org/wiki/HTML_5" target="_blank">维基百科</a>关于 html5 的描述。</p>
<h3>html5 的标签</h3>
<p>与 html4 或者 xhtml1 相比，html5 带来了新的标签，废弃了一些旧的。举个例子，现在我们写一个普通的新闻页面里 &lt;body&gt; 的内容是：</p>

<div class="wp_codebox"><table><tr id="p45810"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="code" id="p458code10"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>div id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;header&quot;</span><span style="color: #339933;">&gt;</span>ihandu<span style="color: #339933;">.</span>com 我们的故事<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span>
&nbsp;
<span style="color: #339933;">&lt;</span>div <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;content&quot;</span><span style="color: #339933;">&gt;</span>
    <span style="color: #339933;">&lt;</span>div <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;news&quot;</span><span style="color: #339933;">&gt;</span>
        <span style="color: #339933;">&lt;</span>h1<span style="color: #339933;">&gt;</span>dUcky的blog<span style="color: #339933;">:</span> ihandu<span style="color: #339933;">.</span>com 我们的故事<span style="color: #339933;">&lt;/</span>h1<span style="color: #339933;">&gt;</span>
        <span style="color: #339933;">&lt;</span>div <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;detail&quot;</span><span style="color: #339933;">&gt;</span>
            <span style="color: #339933;">&lt;</span>p<span style="color: #339933;">&gt;</span>i<span style="color: #339933;">,</span>dUcky<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;</span>
            <span style="color: #339933;">&lt;</span>p<span style="color: #339933;">&gt;</span>Bio<span style="color: #339933;">:</span>交互设计 前端 Gfans html5 带来了什么？ html5 与 css3<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;</span>
        <span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span>
    <span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span>
&nbsp;
<span style="color: #339933;">&lt;</span>div id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;footer&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #cc66cc;">2010</span> ihandu<span style="color: #339933;">.</span>com 我们的故事 版权所有<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>那么用 html5 该怎么写呢？</p>

<div class="wp_codebox"><table><tr id="p45811"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="code" id="p458code11"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>header<span style="color: #339933;">&gt;</span>ihandu<span style="color: #339933;">.</span>com 我们的故事<span style="color: #339933;">&lt;/</span>header<span style="color: #339933;">&gt;</span>
&nbsp;
<span style="color: #339933;">&lt;</span>section<span style="color: #339933;">&gt;</span>
    <span style="color: #339933;">&lt;</span>article<span style="color: #339933;">&gt;</span>
        <span style="color: #339933;">&lt;</span>h1<span style="color: #339933;">&gt;</span>dUcky的blog<span style="color: #339933;">:</span> ihandu<span style="color: #339933;">.</span>com 我们的故事<span style="color: #339933;">&lt;/</span>h1<span style="color: #339933;">&gt;</span>
        <span style="color: #339933;">&lt;</span>section<span style="color: #339933;">&gt;</span>
            <span style="color: #339933;">&lt;</span>p<span style="color: #339933;">&gt;</span>i<span style="color: #339933;">,</span>dUcky<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;</span>
            <span style="color: #339933;">&lt;</span>p<span style="color: #339933;">&gt;</span>Bio<span style="color: #339933;">:</span>交互设计 前端 Gfans  html5 带来了什么？ html5 与 css3<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;</span>
        <span style="color: #339933;">&lt;/</span>section<span style="color: #339933;">&gt;</span>
    <span style="color: #339933;">&lt;/</span>article<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>section<span style="color: #339933;">&gt;</span>
&nbsp;
<span style="color: #339933;">&lt;</span>footer<span style="color: #339933;">&gt;</span><span style="color: #cc66cc;">2010</span> ihandu<span style="color: #339933;">.</span>com 我们的故事 版权所有<span style="color: #339933;">&lt;/</span>footer<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>终于，我们可以真正的摆脱所谓 “div+css” 的标准化了，省去了很多 class 以及 id …</p>
<p><span id="more-458"></span>html5 提供了更多的语义化标签，比如：</p>

<div class="wp_codebox"><table><tr id="p45812"><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code" id="p458code12"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>header<span style="color: #339933;">&gt;</span>页头<span style="color: #339933;">&lt;/</span>header<span style="color: #339933;">&gt;</span> 
<span style="color: #339933;">&lt;</span>footer<span style="color: #339933;">&gt;</span>页脚<span style="color: #339933;">&lt;/</span>footer<span style="color: #339933;">&gt;</span> 
<span style="color: #339933;">&lt;</span>section<span style="color: #339933;">&gt;</span>文档中的区块章节<span style="color: #339933;">&lt;/</span>section<span style="color: #339933;">&gt;</span> 
<span style="color: #339933;">&lt;</span>article<span style="color: #339933;">&gt;</span>文章<span style="color: #339933;">&lt;/</span>article<span style="color: #339933;">&gt;</span> 
<span style="color: #339933;">&lt;</span>video<span style="color: #339933;">&gt;</span>视频内容<span style="color: #339933;">&lt;/</span>video<span style="color: #339933;">&gt;</span> 
<span style="color: #339933;">&lt;</span>audio<span style="color: #339933;">&gt;</span>声音内容<span style="color: #339933;">&lt;/</span>audio<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>等等……</p>
<p>当然，html5 也<strong>抛弃</strong>了一些标签：<br />
center, font, u, strike, s, frameset, frame, applet</p>
<p>我们看到 <strong>frameset</strong> 和 <strong>frame</strong> ，那么框架结构在 html5 里就不复存在了，在我看来，这是个好事情。</p>
<p>关于 html5 标签的详细可以参考：<a href="http://www.w3school.com.cn/html5/index.asp" target="_blank">html5 参考手册</a></p>
<h3>css3 高级选择器</h3>
<p>那么 html5+css3 会是什么样呢？看代码：</p>

<div class="wp_codebox"><table><tr id="p45813"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code" id="p458code13"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>section<span style="color: #339933;">&gt;</span>
    <span style="color: #339933;">&lt;</span>section<span style="color: #339933;">&gt;</span> <span style="color: #339933;">--------------------------------</span> <span style="color: #cc66cc;">1</span>
        <span style="color: #339933;">&lt;</span>section<span style="color: #339933;">&gt;&lt;/</span>section<span style="color: #339933;">&gt;</span> <span style="color: #339933;">------------</span> <span style="color: #cc66cc;">3</span>
        <span style="color: #339933;">&lt;</span>section<span style="color: #339933;">&gt;&lt;/</span>section<span style="color: #339933;">&gt;</span> <span style="color: #339933;">------------</span> <span style="color: #cc66cc;">4</span>
    <span style="color: #339933;">&lt;/</span>section<span style="color: #339933;">&gt;</span>
    <span style="color: #339933;">&lt;</span>section<span style="color: #339933;">&gt;</span> <span style="color: #339933;">--------------------------------</span> <span style="color: #cc66cc;">2</span>
        <span style="color: #339933;">&lt;</span>section<span style="color: #339933;">&gt;&lt;/</span>section<span style="color: #339933;">&gt;</span> <span style="color: #339933;">------------</span> <span style="color: #cc66cc;">5</span>
    <span style="color: #339933;">&lt;/</span>section<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>section<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>CSS3 提供了很多高级选择器：</p>

<div class="wp_codebox"><table><tr id="p45814"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code" id="p458code14"><pre class="css" style="font-family:monospace;">section<span style="color: #00AA00;">&gt;</span>section<span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>  section 直属下级的 section <span style="color: #00AA00;">&#40;</span>编号<span style="color: #cc66cc;">1</span>和编号<span style="color: #cc66cc;">2</span><span style="color: #00AA00;">&#41;</span>
&nbsp;
section<span style="color: #00AA00;">&gt;</span>section<span style="color: #3333ff;">:nth-</span>child<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>  二级 section 中第一个 section <span style="color: #00AA00;">&#40;</span>编号<span style="color: #cc66cc;">1</span><span style="color: #00AA00;">&#41;</span>
section<span style="color: #00AA00;">&gt;</span>section<span style="color: #3333ff;">:nth-</span>child<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>  二级 section 中第二个 section <span style="color: #00AA00;">&#40;</span>编号<span style="color: #cc66cc;">2</span><span style="color: #00AA00;">&#41;</span>
&nbsp;
section<span style="color: #00AA00;">&gt;</span>section<span style="color: #3333ff;">:nth-last-</span>child<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>  二级 section 中最后一个 section <span style="color: #00AA00;">&#40;</span>编号<span style="color: #cc66cc;">2</span><span style="color: #00AA00;">&#41;</span>
section<span style="color: #00AA00;">&gt;</span>section<span style="color: #3333ff;">:nth-last-</span>child<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>  二级 section 中倒数第二个 section <span style="color: #00AA00;">&#40;</span>编号<span style="color: #cc66cc;">1</span><span style="color: #00AA00;">&#41;</span>
&nbsp;
section<span style="color: #00AA00;">&gt;</span>section<span style="color: #3333ff;">:only-of-type</span><span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>  section 下只出现一次的 section <span style="color: #00AA00;">&#40;</span>只能定位到编号<span style="color: #cc66cc;">5</span><span style="color: #00AA00;">&#41;</span></pre></td></tr></table></div>

<p>要弄清关系必须多用，我项目中会用到 css3 的选择器来 hack ，因为现在 IE 看不懂…</p>
<p>CSS3 选择器相关的可以参考：<a href="http://www.456bereastreet.com/archive/200601/css_3_selectors_explained/" target="_blank">css_3_selectors_explained</a></p>
<h3>html5 与 css3 的浏览器兼容性</h3>
<p>上面说到浏览器兼容性，那么哪些浏览器支持 html5 以及 css3 呢？</p>
<p>Safari 4+, Firefox 3.5+, Chrome 3+ 已经支持<br />
Opera 10.5 已经部分支持<br />
ie9 支持 css3 ，<strong>有可能</strong>支持 html5 …</p>
<h3>html5 更多的亮点</h3>
<p>html5 还有更加强大的其他属性，比如：canvas、本地存储和 web socket 等等。</p>
<p>Google 已经宣布放弃 gears 而用 html5 作为离线存储方案；youtube 以及用 html5 架构页面等等，相信未来会有更多关于 html5 的惊喜。</p>
<h4  class="related_post_title">相关文章</h4><ul class="related_post"><li><a href="http://blog.ihandu.com/2010/04/mobile-website-step2/" title="手机网站开发笔记2 &#8211; 完整的头部声明">手机网站开发笔记2 &#8211; 完整的头部声明</a></li><li><a href="http://blog.ihandu.com/2010/04/mobile-website-step1/" title="手机网站开发笔记1 &#8211; 概述">手机网站开发笔记1 &#8211; 概述</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://blog.ihandu.com/2010/03/html5-css3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

