我们进行css网页布局的时候,都知道它需要符合xhtml1.0规范,在VeVb.com昨天的文章中,向大家介绍了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.
attributesalinkthealinkattributedefinesthecolorofanactivelinkonthewebpage.ithasbeendeprecatedinfavorofstylesheets.
alignusedtoalignelementsverticallyandhorizontallyonthedocumentpage,thealignattributehasbeendeprecatedinfavorofstylesheets.
backgroundthebackgroundattributeisusedtodefineabackgroundimagefortheelement.ithasbeendeprecatedinfavorofstylesheets.
borderusedtodefineaborderaroundtheelement,theborderattributehasbeendeprecatedinfavorofstylesheets.
colorusedtodefinethecoloroftheenclosedtext,thecolorattributehasbeendeprecatedinfavorofstylesheets.
compactthecompactattributeisusedinlisttagstocreatealistthattakesuplessspace.ithasbeendeprecatedinfavorofstylesheets.
faceusedtodefinethefontfaceoftheenclosedtext,thefaceattributehasbeendeprecatedinfavorofstylesheets.
heightusedtodefinetheheightoftheelement,theheightattributehasbeendeprecatedinfavorofstylesheets.
languagethelanguageattributeisusedtodefinethelanguageusedbythescriptelement.ithasbeendeprecatedinfavorofthetypeattribute.
linkthelinkattributedefinesthecolorofalinkonthewebpage.ithasbeendeprecatedinfavorofstylesheets.
namethenameattributenamestheelementforusewithdynamiccontent,ithasbeendeprecatedinfavoroftheidattribute.
noshadethenoshadeattributeremovesthe3-deffectfromhorizontalrules.ithasbeendeprecatedinfavorofstylesheets.
nowrapusedtostoptablecontentsfromwrapping,thenowrapattributehasbeendeprecatedinfavorofstylesheets.
sizeusedtodefinethesizeoftheenclosedtext,thesizeattributehasbeendeprecatedinfavorofstylesheets.
startthestartattributeoflisttagsdefinesthestartingnumberofthelist.thisattributehasbeendeprecatedinfavorofstylesheets.
textthetextattributedefinesthecolorofthetextonthewebpage.ithasbeendeprecatedinfavorofstylesheets.
typethetypeattributeoflisttagsdefineswhattypeoflistshouldbeused.thisattributehasbeendeprecatedinfavorofstylesheets.
valuethevalueattributeoflisttagssetsthevalueofthelistitem.thisattributehasbeendeprecatedinfavorofstylesheets.
versiontheversionattributedefinestheversionofhtmlusedbythedocument.ithasbeendeprecatedinfavorofdtds.
vlinkthevlinkattributedefinesthecolorofavisitedlinkonthewebpage.ithasbeendeprecatedinfavorofstylesheets.
widththewidthattributedefinesthewidthinpixelsoftheelement.ithasbeendeprecatedinfavorofstylesheets.