html5废弃元素

表现性元素

下面的元素被废弃的原因是用CSS处理可以更好地替代他们:

  1. basefont
  2. big
  3. center
  4. font
  5. strike
  6. tt

框架类元素

下面的元素被废弃的原因是他们的使用破坏了可使用性和可访问性(但html5支持iframe):

  1. frame
  2. frameset
  3. noframes

其他

下面的元素被废弃的原因是不经常使用他们,也会引起混乱,而且其它元素也可以很好地实现他们的功能:

  • acronym被废弃是因为它经常使页面错乱,可以使用abbr代替
  • applet被废弃是因为可以使用object代替
  • isindex被废弃是因为使用表单控件代替
  • dir被废弃是因为使用ul代替

html5废弃属性

对应替代方案:https://html.spec.whatwg.org/multipage/obsolete.html#non-conforming-features

对应元素

属性名称

link, a

rev, charset

a

shape, coords

img, iframe

longdesc

link

target

area

nohref

head

profile

html

version

img

name

meta

scheme

object

archive, classid, codebase, codetype, declare, standby

param

valuetype, type

td, th

axis, abbr

td

scope

table

summary

以下元素的视觉属性也被废弃,可用CSS来代替:

对应元素

属性名称

caption, iframe, img, input, object, legend, table, hr, div, h1, h2, h3, h4, h5, h6, p, col, colgroup, tbody, td, tfoot, th, thead, tr

align

body

alink, link, text, vlink

body

background

table, tr, td, th, body

bgcolor

object

border

table

cellpadding, cellspacing

col, colgroup, tbody, td, tfoot, th, thead, tr

char, charoff

br

clear

dl, menu, ol, ul

compact

table

frame

iframe

frameborder

td, th

height

img, object

hspace, vspace

iframe

marginheight, marginwidth

hr

noshade

td, th

nowrap

table

rules

iframe

scrolling

hr

size

li, ol, ul

type

col, colgroup, tbody, td, tfoot, th, thead, tr

valign

hr, table, td, th, col, colgroup, pre

width

更多相关文章

  1. “for”属性的目的是什么?
  2. 为什么在vs里使用css时会说FILTER非已知的css属性名.放在前端html
  3. 使用shell从标记中提取多个属性
  4. 垂直对齐div中的两个元素
  5. 如何用c#获取服务器端元素的innerhtml(内部有另一个服务器端控件)
  6. html页面中给img标签的src属性赋值为一张图片的存储路径,图片不显
  7. 如何让你的前端代码更像HTML5(用语义元素构造html5)
  8. HTML 元素用来显示已知范围的标量值或者分数值。
  9. HTML5实战与剖析之媒体元素(1、video标签和audio标签简介)

随机推荐

  1. Android之Activity透明背景
  2. Android Tips---Android平台常见属性集合
  3. 【Android常用控件】EditText常用属性【
  4. Android的IPC机制
  5. Android Tabhost中tab添加数字demo
  6. 【android】EditText属性大全
  7. android(Import Android demo to Eclipse)
  8. 随笔:Android不爱C++
  9. [Android引擎]Android游戏框架AndE…
  10. 自定义View之圆角图片