<meta> 標(biāo)簽位于文檔的頭部,不包含任何內(nèi)容。<meta> 標(biāo)簽的屬性定義了與文檔相關(guān)聯(lián)的名稱/值對。
HTML 4.01 與 HTML 5 之間的差異
在 HTML 5 中,不再支持 scheme 屬性。
在 HTML 5 中,有一個新的 charset 屬性,它使字符集的定義更加容易。
在 HTML 4.01 中,不得不這么寫:
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
在 HTML 5 中,這樣就夠了:
<meta charset="ISO-8859-1">
定義針對搜索引擎的關(guān)鍵詞:
<meta name="keywords" content="HTML, CSS, XML, XHTML, JavaScript" />
定義對頁面的描述:
<meta name="description" content="免費(fèi)的 web 技術(shù)教程。" />
定義頁面的最新版本:
<meta name="revised" content="David, 2008/8/8/" />
每 5 秒刷新一次頁面:
<meta http-equiv="refresh" content="5" />
下面是它的一些相關(guān)屬性:
事件屬性:
onabort, onbeforeunload, onblur, onchange, onclick, oncontextmenu, ondblclick, ondrag, ondragend, ondragenter, ondragleave, ondragover, ondragstart, ondrop, onerror, onfocus, onkeydown, onkeypress, onkeyup, onload, onmessage, onmousedown, onmousemove, onmouseover, onmouseout, onmouseup, onmousewheel, onresize, onscroll, onselect, onsubmit, onunload
聲明:本網(wǎng)頁內(nèi)容旨在傳播知識,若有侵權(quán)等問題請及時與本網(wǎng)聯(lián)系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com