һ
 ע

QQ¼

ֻһٿʼ

ƼĶ

+
̳ WEBҳǰ뿪 WEBҳܱ

[ת] ʹHTML5عWebIE

[]
9440 websjy 2013-11-24 08:43:25
| ʾȫ¥
1F

ϵ½עᣬύѣø๦ܣϴزIJޣ

Ҫ ¼ ſػ鿴ûʺţע  

x
HTML 5ǽʮWeb׼޴ķԾǰİ汾ͬHTML 5ǽʾWebݣʹǽWebһӦƽ̨HTML 5ƽ̨ϣƵƵͼ󣬶ԼͬԵĽ׼㿴HTML5һHTML5عվһ£ιһHTML 5 Webҳ棿

ɺӵ DOCTYPE (ĵ)
HTML ĵй涨ĵͺҪ˽Ԥڵĵ.<!DOCTYPE> ֪ĵʹõ HTML 淶

HTML5µĸı䣬HTML 5 ʹµdoctypeΪʡȥHTML4 XHTML ԼĹʶPUBLICDTD

ΪǰHTML 4.01 SGMLHTML 4.01 е doctype Ҫһ DTDHTML 5 SGMLҲҪ DTDҪĵӦõķʽС

HTML5 Уĵܼ򵥣
< !DOCTYPE html>
HTML ĵй涨ĵͺҪ˽Ԥڵĵ͡

HTML5ĵˬİɣҲdz׼סҴ˱ǩûнǩ ԴСдҲСڹ㷺ʹõİ汾Ҫ򵥵öˣұݡ

Google :
Ǵ򿪹ȸҳԴ룬ǻᷢGoogleҲôȫдһеԴ룺
< !doctype html><html><head><title>Google</title><script>
̵˵,ȸͽҳDz֤ģΪϲʹ һЩ <font> ȲᳫͷıǩһЩĴ󣬵ûϵ

ǿȻHTML 5(磬ڵûԵ<style> <script> Ԫ)ͨʹȷDOCTYPE,Ϊϸĵ

HTML 5 minified
õһ򵥵HTML5ĵµдʹõһĵ

< !DOCTYPE html><title>Small HTML 5</title><p>Hello world</p>ͨcompletely valid HTML 5

HTML 5 complete & compatible
һЧĺHTML 5壺

  1. < !DOCTYPE html><html><head><meta charset=utf-8
  2. /><title>HTML 5 complete</title><!C[if IE]><script
  3. src=http://html5shiv.googlecode.com/svn/trunk/html5.js></script><![endif]C><style>article,
  4. aside, dialog, figure, footer, header,hgroup, menu, nav, section { display:
  5. block; }</style></head><body><p>Hello
  6. World</p></body></html>
ƴ

HTML5ļԴϵĴзһδ룺
þʹIE8͸IE汾֧HTML5.
ĵHTML5֧⡣Ŀǰ HTML5 structural elements

(Firefox 3+, Safari 3+, Opera 9+, Chrome 1+)еõ֧֡
˽ļݣ뿴CSS3 HTML5 Բ ־
ҪʹЩHTML5ԪأһҪǽΪCSSĿ鼶Ԫأ
/* Declaring HTML5 elements */article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary{display: block;}

һHTML5ʽ
ҪõIE8°֧֣ҪͨJavaScript֧֡
(function(){if(!/*@cc_on!@*/0)return;var e = abbr,article,aside,audio,canvas,details,figcaption,figure,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,summary,time,video.split(,),i=e.length;while(iC){document.createElement(e)}})()
ǽʹRemy SharpsĹȸй JavaScript ֧HTML5 ҳ< head > 

< !C[if IE]><script src=http://html5shiv.googlecode.com/svn/trunk/html5.js></script><![endif]C>һĴ룺
< !DOCTYPE html><html><head><meta charset=utf-8 /><title>HTML 5 complete</title><!C[if IE]><script src=http://html5shiv.googlecode.com/svn/trunk/html5.js></script><![endif]C><style>article, aside, dialog, figure, footer, header,hgroup, menu, nav, section { display: block; }</style></head><body> ҪֵעǣDZ뱣֤ǵIE ûнJavaScriptԲԣ

ڸ˵IJͻ̳ӦHTML5ȻõIEJavaScriptǷ񱻽ã⵱Ȼ鷳µҵĿϲHTML5ûIEJavaScriptĻHTML5ԪغصĽṹͻҳ㱼ЧǷʶ

ʱ򣬾ͻûԶ鷳ˡǷиͷIEѾе㼫˵ˡӦóIEǵҪĽɫǵĹʹIEЩõĹҲIEĺġIE͵ڷûѾ뵽ˡ

ҲΪIEȱûJavaScript֧ЩµԪζ㲻ʹ HTML5±ǩ

棬ȻԴ棬һHTML5Ϊṩ˷ḻ壬ǿʹHTML5Ϊ&<div>ҲHTML5ɰɣ HTML4/XHTML1.0HTML5жʹá

Ѿʹһ׼id ƻclassƣôõһ׼塣HTML5HTML4/XHTML1һԣֻҪʹHTML5µݣǿIEйġ

Դ΢http://weibo.com/techued Դ΢Źںţweb-tech
ʹõ ٱ ظ
б

ֹ

²

̳¡ͼƬѷϴվԭתԻ,µİȨԭ
վַİȨ֪ͨǵĹԱ,Ա(Email:admin@websjy.com)ʱȡȨɾ
ܾκκʽڱ̳л񹲺͹ִ!

QQ| 42011102000510|Archiver|ֻ|Դ ( ICP14013341-1

GMT+8, 2018-1-21 16:47

Powered by Discuz! X3.2

ԴԴվ  ԴAPPӦ֮

ٻظ ض б