XHTML中不再使用HTML中的一些废弃元素_XHTML教程-查字典教程网
XHTML中不再使用HTML中的一些废弃元素
XHTML中不再使用HTML中的一些废弃元素
发布时间:2016-12-27 来源:查字典编辑
摘要:我们进行CSS网页布局的时候,都知道它需要符合XHTML1.0规范,在jb51.net昨天的文章中,向大家介绍了DTD。如果我们在进行CSS...

我们进行CSS网页布局的时候,都知道它需要符合XHTML1.0规范,在jb51.net昨天的文章中,向大家介绍了DTD。如果我们在进行CSS网页布局的时候,还在使用被W3C废弃的元素,那就失去了使用CSS的意义,虽然它们可能同样被样式控制。

在XHTML中不再使用HTML中的一些废弃元素。它们主要有以下一些。

ElementsandattributesthathavebeendeprecatedinthemostrecentversionofXHTML,XHTML1.0.

Elements

<applet></applet>

Theappletelementhasbeendeprecatedinfavorof<object></object>.

<basefont/>

Thebasefontelementhasbeendeprecatedinfavorofstylesheets.

<blackface></blackface>

TheblackfaceelementisaWebTV(MSNTV)elementthathasbeendeprecatedinfavorofstylesheets.

<blockquote></blockquote>

Theblockquoteelementisdeprecatedinfavorofstylesheetswhenusedtoindenttext.

<center></center>

Thecenterelementhasbeendeprecatedinfavorofstylesheets.

<dir></dir>

Thedirelementhasbeendeprecatedinfavorof<ul></ul>.

<embed/>

Theembedelementhasbeendeprecatedinfavorof<object></object>.

<font></font>

Thefontelementhasbeendeprecatedinfavorofstylesheets.

<i></i>

Theielementhasbeendeprecatedinfavorofstylesheets.

<isindex/>

TheisindexelementhasbeendeprecatedinfavoroftheinputelementandCGIforms.

<layer></layer>

Thelayerelementhasbeendeprecatedinfavorofstylesheets.

<menu></menu>

Themenuelementhasbeendeprecatedinfavorof<ul></ul>.

<noembed></noembed>

Thenoembedelementhasbeendeprecatedinfavorof<object></object>.

<s></s>

Theselementhasbeendeprecatedinfavorofstylesheets.

<shadow></shadow>

Theshadowelementhasbeendeprecatedinfavorofstylesheets.

<strike></strike>

Thestrikeelementhasbeendeprecatedinfavorofstylesheets.

<u></u>

Thestrikeelementhasbeendeprecatedinfavorofstylesheets.

Attributes

alink

ThealinkattributedefinesthecolorofanactivelinkontheWebpage.Ithasbeendeprecatedinfavorofstylesheets.

align

Usedtoalignelementsverticallyandhorizontallyonthedocumentpage,thealignattributehasbeendeprecatedinfavorofstylesheets.

background

Thebackgroundattributeisusedtodefineabackgroundimagefortheelement.Ithasbeendeprecatedinfavorofstylesheets.

border

Usedtodefineaborderaroundtheelement,theborderattributehasbeendeprecatedinfavorofstylesheets.

color

Usedtodefinethecoloroftheenclosedtext,thecolorattributehasbeendeprecatedinfavorofstylesheets.

compact

Thecompactattributeisusedinlisttagstocreatealistthattakesuplessspace.Ithasbeendeprecatedinfavorofstylesheets.

face

Usedtodefinethefontfaceoftheenclosedtext,thefaceattributehasbeendeprecatedinfavorofstylesheets.

height

Usedtodefinetheheightoftheelement,theheightattributehasbeendeprecatedinfavorofstylesheets.

language

Thelanguageattributeisusedtodefinethelanguageusedbythescriptelement.Ithasbeendeprecatedinfavorofthetypeattribute.

link

ThelinkattributedefinesthecolorofalinkontheWebpage.Ithasbeendeprecatedinfavorofstylesheets.

name

Thenameattributenamestheelementforusewithdynamiccontent,ithasbeendeprecatedinfavoroftheidattribute.

noshade

Thenoshadeattributeremovesthe3-Deffectfromhorizontalrules.Ithasbeendeprecatedinfavorofstylesheets.

nowrap

Usedtostoptablecontentsfromwrapping,thenowrapattributehasbeendeprecatedinfavorofstylesheets.

size

Usedtodefinethesizeoftheenclosedtext,thesizeattributehasbeendeprecatedinfavorofstylesheets.

start

Thestartattributeoflisttagsdefinesthestartingnumberofthelist.Thisattributehasbeendeprecatedinfavorofstylesheets.

text

ThetextattributedefinesthecolorofthetextontheWebpage.Ithasbeendeprecatedinfavorofstylesheets.

type

Thetypeattributeoflisttagsdefineswhattypeoflistshouldbeused.Thisattributehasbeendeprecatedinfavorofstylesheets.

value

Thevalueattributeoflisttagssetsthevalueofthelistitem.Thisattributehasbeendeprecatedinfavorofstylesheets.

version

TheversionattributedefinestheversionofHTMLusedbythedocument.IthasbeendeprecatedinfavorofDTDs.

vlink

ThevlinkattributedefinesthecolorofavisitedlinkontheWebpage.Ithasbeendeprecatedinfavorofstylesheets.

width

Thewidthattributedefinesthewidthinpixelsoftheelement.Ithasbeendeprecatedinfavorofstylesheets.

相关阅读
推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
  • 大家都在看
  • 小编推荐
  • 猜你喜欢
  • 最新XHTML学习
    热门XHTML学习
    网页设计子分类