html5中,在新增加和廢除很多元素的同時,也增加和廢除了很多屬性。
新增的屬性
1、表單相關的屬性
2、鏈結相關屬性
3、其他屬性
為html元素增加manifest,開發離線web應用程式時他與api結合使用,定義乙個url,在這個url上描述文件的快取資訊。
為iframe增加撒個屬性,sandbox、seamless、srcdoc。用來提高頁面安全性,防止不信任的web頁面執行某些操作。
廢除的屬性
html4中一些屬性在html5中不再被使用,而是採用其他屬性或其他方式進行替代。
在html 4中使用的屬性
使用該屬性的元素
在html 5中的替代方案
rev
link、a
relcharset
link、a
在被鏈結的資源的中使用http content-type頭元素
shape、coords
a使用area元素代替a元素
longdesc
img、iframe
使用a元素鏈結到校長描述
target
link
多餘屬性,被省略
nohref
area
多餘屬性,被省略
profile
head
多餘屬性,被省略
version
html
多餘屬性,被省略
name
imgid
scheme
meta
只為某個表單域使用scheme
archive、chlassid、codebose、codetype、declare、standby
object
使用data與typc屬性類呼叫外掛程式。需要使用這些屬性來設定引數時,使用param屬性
valuetype、type
param
使用name與value屬性,不宣告之的mime型別
axis、abbr
td、th
使用以明確簡潔的文字開頭、後跟詳述文字的形式。可以對更詳細內容使用title屬性,來使單元格的內容變得簡短
scope
td在被鏈結的資源的中使用http content-type頭元素
align
caption、input、legend、div、h1、h2、h3、h4、h5、h6、p
使用css樣式表替代
alink、link、text、vlink、background、bgcolor
body
使用css樣式表替代
align、bgcolor、border、cellpadding、cellspacing、frame、rules、width
table
使用css樣式表替代
align、char、charoff、height、nowrap、valign
tbody、thead、tfoot
使用css樣式表替代
align、bgcolor、char、charoff、height、nowrap、valign、width
td、th
使用css樣式表替代
align、bgcolor、char、charoff、valign
tr使用css樣式表替代
align、char、charoff、valign、width
col、colgroup
使用css樣式表替代
align、border、hspace、vspace
object
使用css樣式表替代
clear
br使用css樣式表替代
compace、type
ol、ul、li
使用css樣式表替代
compace
dl使用css樣式表替代
compace
menu
使用css樣式表替代
width
pre使用css樣式表替代
align、hspace、vspace
img使用css樣式表替代
align、noshade、size、width
hr使用css樣式表替代
align、frameborder、scrolling、marginheight、marginwidth
iframe
使用css樣式表替代
autosubmit
menu
HTML5廢除的屬性
在html 4中使用的屬性 使用該屬性的元素 在html 5中的替代方案 revlink a relcharset link a 在被鏈結的資源的中使用http content type頭元素 shape coords a使用area元素代替a元素 longdesc img iframe 使用a元素...
html5新增與廢除的標籤
新增標籤 結構標籤 塊狀元素 有意義的div 標籤 描述定義文章 定義乙個頁面或乙個區域的頭部 定義 section 或 page 的頁首 標籤不能被放在 或者另乙個 元素內部。定義導航鏈結 定義文件中的節 section 區段 比如章節 頁首 頁尾或文件中的其他部分 定義其所處內容之外的內容 側邊...
HTML5新增屬性
html5的input標籤新增了很多屬性,也是讓大家非常興奮的一件事,用簡單的乙個屬性搞定以前複雜的js驗證。input新增的這些屬性,使得html和js的分工更明確了,使用起來十分舒暢。size medium 新增屬性一 size autoconmplete autoconmplete可以賦值為 ...