XHTML中不再使用HTML中的一些废弃元素

所属分类: 网页制作 / HTML/Xhtml 阅读数: 398
收藏 0 赞 0 分享
我们进行CSS网页布局的时候,都知道它需要符合XHTML1.0规范,在jb51.net昨天的文章中,向大家介绍了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. 

更多精彩内容其他人还在看

W3C教程(14):W3C RDF和OWL活动

RDF 和 OWL 是两项重要的语义网技术。 RDF 和 OWL 是两项重要的语义网技术。 语义网 (Semantic Web) 语义网是为资产管理、企业整合及网络数据的共享和重用提供的一个框架。 语义网为企业、应
收藏 0 赞 0 分享

W3C教程(16):其他的W3C活动

本节概况了其他一些重要和有趣的 W3C 活动。 本节概况了其他一些重要和有趣的 W3C 活动。 Web Accessibility Initiative (WAI) WAI 定义了如何使残障人士更易使用 Web 内容的指
收藏 0 赞 0 分享

W3C教程(13):W3C WSDL 活动

Web Services 与应用程序到应用程序的通信有关。WSDL 是一门基于 XML 的 Web Services 描述语言。 Web Services 与应用程序到应用程序的通信有关。 WSDL 是一门基于 XML 的 Web Se
收藏 0 赞 0 分享

W3C教程(15):W3C SMIL 活动

SMIL 向 web 增加了对定时和媒介同步的支持。 SMIL 向 web 增加了对定时和媒介同步的支持。 SMIL SMIL (Synchronized Multimedia Integration Language)
收藏 0 赞 0 分享

深层优化 提高网站的访问速度的一些技巧

深层优化 提高网站的访问速度的一些技巧   网站访问速度可以直接影响到网站的流量,而网站的访问量几乎与网站的利益直接挂钩,因此网站的速度问题成为企业及站长十分关注的问题。现在网站越来越多,不少朋友的网站打开速度很
收藏 0 赞 0 分享

网页制作中使用规范的HTML代码的几点

许多网站设计者最常犯的错误便是当其网页能够在IE下正常显示便认为其代码正确无误,甚至常看到有人在抱怨其网站排名不理想,到其网站简单看一下便可发现HTML代码中充斥各种各样的错误,在那样的代码基础上无论付出多少努力去优化网站结果都可能
收藏 0 赞 0 分享

关于超链接的一些问题

很高兴参加了这一期的薯片会,认识了几个朋友~~不料的却是今天我要来总结一下 很高兴参加了这一期的薯片会,认识了几个朋友~~不料的却是今天我要来总结一下 本次薯片会我们总共讨论了三个议题: A、 如何让“用
收藏 0 赞 0 分享

入门:HTML的基本标签和属性简单介绍

HTML是由标志和属性构成的,它们一起被用来告诉浏览器应该如何显示一页文档。标志用来引用一段文字或是一幅图片等文档部件,属性是标志的选项,在标志中修饰,如颜色,对齐方式,高度和宽度等。很多标志都成对出现,例如有 就有 前一个表示开始
收藏 0 赞 0 分享

总结XHTML代码常见的应用问题

一段时间以来,发现有很多人XHTML都不会用,不光是普通的初学者,有的程序员都不是很清楚该怎么写这个XHTML,我这里呢算是把一些常见的应用问题做一个总结,也算能使得大家能在沟通,合作上能形成默契。 一段时间以来,发现有
收藏 0 赞 0 分享

作用相似html标记:strong与em、q、cite、blockquote

在XHTML标签中有一些标签的作用是相似的,当然这里的相似是指语义相似,以至于很多人都不清楚这些相似的标签如何使用,那么今天的主题就是分解相似的标签,明确各个标签的用途。在前面我们已经讲过了strong与em的区别。除了strong与em之外还有
收藏 0 赞 0 分享
查看更多