HTML5 - 已棄用標籤和屬性



已棄用標籤

以下元素在 HTML5 中不再可用,其功能更好地由 CSS 處理:

標籤(元素) 描述
<acronym> 定義首字母縮寫
<applet> 定義小程式
<basefont> 定義頁面的基準字型。
<big> 定義大號文字
<center> 定義居中文字
<dir>定義目錄列表
<font> 定義文字字型、大小和顏色
<frame> 定義框架
<frameset> 定義一組框架
<isindex> 定義單行輸入欄位
<noframes> 定義無框架部分
<s> 定義刪除線文字
<strike> 定義刪除線文字
<tt> 定義電傳文字
<u> 定義下劃線文字

已棄用屬性

HTML5 沒有 HTML4 中存在的任何表現屬性,因為它們的功能更好地由 CSS 處理。HTML4 中的一些屬性在 HTML5 中根本不允許使用,並且已被完全刪除。

下表列出了已刪除的屬性及其對應的受影響標籤(元素),即已永久刪除這些屬性的元素:

已刪除屬性 來自元素
rev link, a
charset link 和 a
shape a
coords a
longdesc img 和 iframe。
target link
nohref area
profile head
version html
name img
scheme meta
archive object
classid object
codebase object
codetype object
declare object
standby object
valuetype param
type param
axis td 和 th
abbr td 和 th
scope td
align caption, iframe, img, input, object, legend, table, hr, div, h1, h2, h3, h4, h5, h6, p, col, colgroup, tbody, td, tfoot, th, thead 和 tr。
alink body
link body
vlink body
text body
background body
bgcolor table, tr, td, th 和 body。
border table 和 object。
cellpadding table
cellspacing table
char col, colgroup, tbody, td, tfoot, th, thead 和 tr。
charoff col, colgroup, tbody, td, tfoot, th, thead 和 tr。
clear br
compact dl, menu, ol 和 ul。
frame table
compact dl, menu, ol 和 ul。
frame table
frameborder iframe
hspace img 和 object。
vspace img 和 object。
marginheight iframe
marginwidth iframe
noshade hr
nowrap td 和 th
rules table
scrolling iframe
size hr
type li, ol 和 ul。
valign col, colgroup, tbody, td, tfoot, th, thead 和 tr
width hr, table, td, th, col, colgroup 和 pre。
廣告