我们进行css网页布局的时候,都知道它需要符合xhtml1.0规范,在VeVb.com昨天的文章中,向大家介绍了dtd。如果我们在进行css网页布局的时候,还在使用被w3c废弃的元素,那就失去了使用css的意义,虽然它们可能同样被样式控制。
在xhtml中不再使用html中的一些废弃元素。它们主要有以下一些。
elements and attributes that have been deprecated in the most recent version of xhtml, xhtml 1.0.
elements
<applet></applet>
the applet element has been deprecated in favor of <object></object>.
<basefont />
the basefont element has been deprecated in favor of style sheets.
<blackface></blackface>
the blackface element is a webtv (msn tv) element that has been deprecated in favor of style sheets.
<blockquote></blockquote>
the blockquote element is deprecated in favor of style sheets when used to indent text.
<center></center>
the center element has been deprecated in favor of style sheets.
<dir></dir>
the dir element has been deprecated in favor of <ul></ul>.
<embed />
the embed element has been deprecated in favor of <object></object>.
<font></font>
the font element has been deprecated in favor of style sheets.
<i></i>
the i element has been deprecated in favor of style sheets.
<isindex />
the isindex element has been deprecated in favor of the input element and cgi forms.
<layer></layer>
the layer element has been deprecated in favor of style sheets.
<menu></menu>
the menu element has been deprecated in favor of <ul></ul>.
<noembed></noembed>
the noembed element has been deprecated in favor of <object></object>.
<s></s>
the s element has been deprecated in favor of style sheets.
<shadow></shadow>
the shadow element has been deprecated in favor of style sheets.
<strike></strike>
the strike element has been deprecated in favor of style sheets.
<u></u>
the strike element has been deprecated in favor of style sheets.
attributes
alink
the alink attribute defines the color of an active link on the web page. it has been deprecated in favor of style sheets.
align
used to align elements vertically and horizontally on the document page, the align attribute has been deprecated in favor of style sheets.
background
the background attribute is used to define a background image for the element. it has been deprecated in favor of style sheets.
border
used to define a border around the element, the border attribute has been deprecated in favor of style sheets.
color
used to define the color of the enclosed text, the color attribute has been deprecated in favor of style sheets.
compact
the compact attribute is used in list tags to create a list that takes up less space. it has been deprecated in favor of style sheets.
face
used to define the font face of the enclosed text, the face attribute has been deprecated in favor of style sheets.
height
used to define the height of the element, the height attribute has been deprecated in favor of style sheets.
language
the language attribute is used to define the language used by the script element. it has been deprecated in favor of the type attribute.
link
the link attribute defines the color of a link on the web page. it has been deprecated in favor of style sheets.
name
the name attribute names the element for use with dynamic content, it has been deprecated in favor of the id attribute.
noshade
the noshade attribute removes the 3-d effect from horizontal rules. it has been deprecated in favor of style sheets.
nowrap
used to stop table contents from wrapping, the nowrap attribute has been deprecated in favor of style sheets.
size
used to define the size of the enclosed text, the size attribute has been deprecated in favor of style sheets.
start
the start attribute of list tags defines the starting number of the list. this attribute has been deprecated in favor of style sheets.
text
the text attribute defines the color of the text on the web page. it has been deprecated in favor of style sheets.
type
the type attribute of list tags defines what type of list should be used. this attribute has been deprecated in favor of style sheets.
value
the value attribute of list tags sets the value of the list item. this attribute has been deprecated in favor of style sheets.
version
the version attribute defines the version of html used by the document. it has been deprecated in favor of dtds.
vlink
the vlink attribute defines the color of a visited link on the web page. it has been deprecated in favor of style sheets.
width
the width attribute defines the width in pixels of the element. it has been deprecated in favor of style sheets.
新闻热点
疑难解答