萬盛學電腦網

您现在的位置: 萬盛學電腦網 >> 程式設計 >  >> 網頁製作 >> XML 程式設計

HTML5 學習筆記(十):廢棄的元素與屬性完整清單

廢棄元素

以 CSS 取代

  • basefont
  • big
  • center
  • font
  • strike
  • tt

損害可用性/可存取性

  • frame
  • frameset
  • noframes

鮮少使用、易混淆、他元素可替代

  • acronym → 改用 abbr
  • applet → 改用 object
  • isindex → 改用表單控件
  • dir → 改用 ul

noscript 僅能用於 HTML,不可用於 XML。

廢棄屬性

HTML4 部分屬性在 HTML5 不再允許,新文檔使用會標記為不合法。規範提供替代方案。

ID對應元素屬性名稱
01link, arev, charset
02ashape, coords
03img, iframelongdesc
04linktarget
05areanohref
06headprofile
07htmlversion
08imgname
09metascheme
10objectarchive, classid, codebase, codetype, declare, standby
11paramvaluetype, type
12td, thaxis, abbr
13tdscope
14tablesummary

視覺呈現屬性(改用 CSS)

ID對應元素屬性名稱
01caption, iframe, img, input, object, legend, table, hr, div, h1-h6, p, col, colgroup, tbody, td, tfoot, th, thead, tralign
02bodyalink, link, text, vlink
03bodybackground
04table, tr, td, th, bodybgcolor
05objectborder
06tablecellpadding, cellspacing
07col, colgroup, tbody, td, tfoot, th, thead, trchar, charoff
08brclear
09dl, menu, ol, ulcompact
10tableframe
11iframeframeborder
12td, thheight
13img, objecthspace, vspace
14iframemarginheight, marginwidth
15hrnoshade
16td, thnowrap
17tablerules
18iframescrolling
19hrsize
20li, ol, ultype
21col, colgroup, tbody, td, tfoot, th, thead, trvalign
22hr, table, td, th, col, colgroup, prewidth
copyright © 萬盛學電腦網 all rights reserved