HTML5 - 弃用标签 & 属性

不推荐使用的标签

HTML5中不再提供以下元素,CSS可以更好地处理它们的功能;

标签(元素) 描述
<acronym> 定义首字母缩略词
<applet> 定义小程序
<basefont> 定义页面的基本字体.
<big> 定义大文
<center> 定义居中text
<dir> 定义目录列表
<font> 定义文本字体,大小和颜色
<frame> 定义一个框架
<frameset> 定义一组框架
<isindex> 定义单行输入字段
<noframes> 定义noframe部分
<s> 定义删除线文字
<strike> 定义striket hrough text
<tt> 定义电传文字
<u> 定义带下划线的文字

不推荐使用的属性

HTML5没有HTML4中的表示属性,因为CSS可以更好地处理它们的功能. HTML5中的某些属性根本不再允许在HTML5中使用,并且它们已被完全删除.

以下是删除了属性及其相应的受影响标记(元素)的表格,即.永久删除这些属性的元素 :

删除属性 从元素
rev link,a
charset link and 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
standby object
standby object
valuetype param
type param
axis td和t
abbr td和t
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 and tr.
alink body
link body
vlink body
text body
background body
bgcolor table,tr,td,th和body.
border table and 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
scrolling 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.
本文链接:https://www.f2er.com/3188882.html