Html5 简明教程

HTML5 - Deprecated Tags & Attributes

Deprecated Tags

以下元素现已不再出现在 HTML5 中,并且它们的函数将由 CSS 更好地处理:

The following elements are not available in HTML5 anymore and their function is better handled by CSS −

Tags (Elements)

Description

<acronym>

Defines an acronym

<applet>

Defines an applet

<basefont>

Defines an base font for the page.

<big>

Defines big text

<center>

Defines centered text

<dir>

Defines a directory list

<font>

Defines text font, size, and color

<frame>

Defines a frame

<frameset>

Defines a set of frames

<isindex>

Defines a single-line input field

<noframes>

Defines a noframe section

<s>

Defines strikethrough text

<strike>

Defines strikethrough text

<tt>

Defines teletype text

<u>

Defines underlined text

Deprecated Attributes

HTML5 不再包含 HTML4 中存在的任何演示属性,因为其函数由 CSS 更好地处理。HTML4 中的某些属性不再允许在 HTML5 中使用,它们已经被完全移除。

HTML5 has none of the presentational attributes that were in HTML4 as their functions are better handled by CSS. Some attributes from HTML4 are no longer allowed in HTML5 at all and they have been removed completely.

下表列出了已删除的属性及其相应的影响标记(元素),即已永久删除这些属性的元素:

Following is the table having removed attributed and their corresponding impacted tags (elements) ie. elements from which those attributes have been removed permanently −

Removed Attributes

From the Elements

rev

link, a

charset

link and a

shape

a

coords

a

longdesc

img and 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 and t

abbr

td and 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 and body.

border

table and object.

cellpadding

table

cellspacing

table

char

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

charoff

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

clear

br

compact

dl, menu, ol and ul.

frame

table

compact

dl, menu, ol and ul.

frame

table

frameborder

iframe

hspace

img and object.

vspace

img and object.

marginheight

iframe

marginwidth

iframe

noshade

hr

nowrap

td and th

rules

table

scrolling

iframe

size

hr

type

li, ol and ul.

valign

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

width

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