HTML5?簡(jiǎn)介
[if !vml]
[endif]
HTML5是HTML最新的修訂版本雨涛,2014年10月由萬(wàn)維網(wǎng)聯(lián)盟(W3C)完成標(biāo)準(zhǔn)制定锨天。
HTML5的設(shè)計(jì)目的是為了在移動(dòng)設(shè)備上支持多媒體音比。
HTML5 簡(jiǎn)單易學(xué)挖胃。
什么是HTML5?
HTML5 是下一代 HTML 標(biāo)準(zhǔn)景描。
HTML , HTML 4.01的上一個(gè)版本誕生于 1999 年锋八。自從那以后鳄逾,Web 世界已經(jīng)經(jīng)歷了巨變蝎抽。
HTML5 仍處于完善之中愿卒。然而缚去,大部分現(xiàn)代瀏覽器已經(jīng)具備了某些 HTML5 支持。
HTML5 是如何起步的琼开?
HTML5 是 W3C 與 WHATWG 合作的結(jié)果,WHATWG 指 Web Hypertext
Application Technology Working Group易结。
WHATWG 致力于 web 表單和應(yīng)用程序,而 W3C 專注于 XHTML 2.0稠通。在 2006 年衬衬,雙方?jīng)Q定進(jìn)行合作,來(lái)創(chuàng)建一個(gè)新版本的 HTML改橘。
HTML5 中的一些有趣的新特性:
[if !supportLists]·????????[endif]用于繪畫的 canvas 元素
[if !supportLists]·????????[endif]用于媒介回放的 video 和 audio 元素
[if !supportLists]·????????[endif]對(duì)本地離線存儲(chǔ)的更好的支持
[if !supportLists]·????????[endif]新的特殊內(nèi)容元素滋尉,比如 article、footer飞主、header狮惜、nav、section
[if !supportLists]·????????[endif]新的表單控件碌识,比如 calendar碾篡、date、time筏餐、email开泽、url、search
HTML5
聲明必須位于 HTML5 文檔中的第一行,使用非常簡(jiǎn)單:
最小的HTML5文檔
下面是一個(gè)簡(jiǎn)單的HTML5文檔:
文檔標(biāo)題 文檔內(nèi)容......
注意:對(duì)于中文網(wǎng)頁(yè)需要使用
charset="utf-8">聲明編碼魁瞪,否則會(huì)出現(xiàn)亂碼穆律。
HTML5 的改進(jìn)
[if !supportLists]·????????[endif]新元素
[if !supportLists]·????????[endif]新屬性
[if !supportLists]·????????[endif]完全支持CSS3
[if !supportLists]·????????[endif]Video 和Audio
[if !supportLists]·????????[endif]2D/3D 制圖
[if !supportLists]·????????[endif]本地存儲(chǔ)
[if !supportLists]·????????[endif]本地 SQL 數(shù)據(jù)
[if !supportLists]·????????[endif]Web 應(yīng)用
HTML5 多媒體
使用 HTML5 你可以簡(jiǎn)單的在網(wǎng)頁(yè)中播放 視頻(video)與音頻 (audio) 。
[if !supportLists]·????????[endif]HTML5?
[if !supportLists]·????????[endif]HTML5?
HTML5 應(yīng)用
使用 HTML5 你可以簡(jiǎn)單地開(kāi)發(fā)應(yīng)用
[if !supportLists]·????????[endif]本地?cái)?shù)據(jù)存儲(chǔ)
[if !supportLists]·????????[endif]訪問(wèn)本地文件
[if !supportLists]·????????[endif]本地 SQL 數(shù)據(jù)
[if !supportLists]·????????[endif]緩存引用
[if !supportLists]·????????[endif]Javascript 工作者
[if !supportLists]·????????[endif]XHTMLHttpRequest 2
HTML5 圖形
使用 HTML5 你可以簡(jiǎn)單的繪制圖形:
[if !supportLists]·????????[endif]使用??元素导俘。
[if !supportLists]·????????[endif]使用內(nèi)聯(lián)?SVG峦耘。
[if !supportLists]·????????[endif]使用?CSS3 2D 轉(zhuǎn)換、CSS3 3D 轉(zhuǎn)換旅薄。
HTML5 使用CSS3
[if !supportLists]·????????[endif]新選擇器
[if !supportLists]·????????[endif]新屬性
[if !supportLists]·????????[endif]動(dòng)畫
[if !supportLists]·????????[endif]2D/3D 轉(zhuǎn)換
[if !supportLists]·????????[endif]圓角
[if !supportLists]·????????[endif]陰影效果
[if !supportLists]·????????[endif]可下載的字體
了解更多CSS3知識(shí)請(qǐng)查看本站的?CSS3 教程辅髓。
語(yǔ)義元素
HTML5 添加了很多語(yǔ)義元素如下所示:
標(biāo)簽描述
定義頁(yè)面獨(dú)立的內(nèi)容區(qū)域。
定義頁(yè)面的側(cè)邊欄內(nèi)容少梁。
允許您設(shè)置一段文本洛口,使其脫離其父元素的文本方向設(shè)置。
定義命令按鈕猎莲,比如單選按鈕绍弟、復(fù)選框或按鈕
用于描述文檔或文檔某個(gè)部分的細(xì)節(jié)
定義對(duì)話框,比如提示框
標(biāo)簽包含 details 元素的標(biāo)題
規(guī)定獨(dú)立的流內(nèi)容(圖像著洼、圖表樟遣、照片而叼、代碼等等)。
定義 元素的標(biāo)題
定義 section 或 document 的頁(yè)腳豹悬。
定義了文檔的頭部區(qū)域
定義帶有記號(hào)的文本葵陵。
定義度量衡。僅用于已知最大和最小值的度量瞻佛。
定義導(dǎo)航鏈接的部分脱篙。
定義任何類型的任務(wù)的進(jìn)度。
定義 ruby 注釋(中文注音或字符)伤柄。
定義字符(中文注音或字符)的解釋或發(fā)音绊困。
在 ruby 注釋中使用,定義不支持 ruby 元素的瀏覽器所顯示的內(nèi)容适刀。
定義文檔中的節(jié)(section秤朗、區(qū)段)。
定義日期或時(shí)間笔喉。
規(guī)定在文本中的何處適合添加換行符取视。
HTML5 表單
新表單元素, 新屬性,新輸入類型常挚,自動(dòng)驗(yàn)證作谭。
已移除元素
以下的 HTML 4.01 元素在HTML5中已經(jīng)被刪除:
[if !supportLists]·????????[endif]
[if !supportLists]·????????[endif]
[if !supportLists]·????????[endif]
[if !supportLists]·????????[endif]
[if !supportLists]·????????[endif]
[if !supportLists]·????????[endif]
[if !supportLists]·????????[endif]
[if !supportLists]·????????[endif]
[if !supportLists]·????????[endif]
[if !supportLists]·????????[endif]
[if !supportLists]·????????[endif]
每一章中的實(shí)例
通過(guò)我們的 HTML 編輯器,您能夠編輯 HTML奄毡,然后點(diǎn)擊按鈕來(lái)查看結(jié)果折欠。
實(shí)例
? 菜鳥教程(runoob.com)? 你的瀏覽器不支持 video 標(biāo)簽。
點(diǎn)擊 "嘗試一下" 按鈕查看在線運(yùn)行結(jié)果吼过。
HTML5 瀏覽器支持
最新版本的 Safari怨酝、Chrome、Firefox 以及 Opera 支持某些 HTML5 特性那先。Internet Explorer 9 將支持某些 HTML5 特性。
[if !vml]
[endif]
IE9 以下版本瀏覽器兼容HTML5的方法赡艰,使用本站的靜態(tài)資源的html5shiv包:
9]>
src="http://cdn.static.runoob.com/libs/html5shiv/3.7/html5shiv.min.js">
載入后售淡,初始化新標(biāo)簽的CSS:
/*html5*/ article,aside,dialog,footer,header,section,nav,figure,menu{display:block}
+群289683894領(lǐng)取資料,交流學(xué)習(xí)