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。
广告
© . All rights reserved.