当前位置: 首页 > 网络学院 > 网页制作基础教程 > HTML > HTML 4.0

HTML
HTML Head
HTML Meta
HTML URLs
HTML Scripts
HTML 属性
HTML 事件
HTML URL-encode
HTML Web服务器
HTML 摘要
HTML 实例
标签列表
标准属性
事件属性
ASCII码
特殊字符
HTTP状态消息

HTML 4.0


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-01   浏览: 855 ::
收藏到网摘: n/a

HTML 3.2 Was Very Wrong !
HTML 3.2有非常严重的错误!

The original HTML was never intended to contain tags for formatting a document. HTML tags were intended to define the content of the document like:
初始的HTML不应对文档有任何版式上的影响。

<p>This is a paragraph</p>

<h1>This is a heading</h1>

When tags like <font> and color attributes were added to the HTML 3.2 specification, it started a nightmare for web developers. Development of large web sites where fonts and color information had to be added to every single Web page, became a long, expensive and unduly painful process.
当HTML3.2加入类似<font>和颜色属性的时候,对于那些WEB开发人员来说噩梦到了。大型站点里的字体和颜色信息被放置于每一个页面里,这是个痛苦漫长的过程。


What is so Great About HTML 4.0 ?
HTML4.0有什么重大意义?

In HTML 4.0 all formatting can be removed from the HTML document and stored in a separate style sheet.
在HTML4.0中所有的格式信息都可以被移除,它们可以由一个分离的样式表来取代。

Because HTML 4.0 separates the presentation from the document structure, we have what we always needed: Total control of presentation layout without messing up the document content.
HTML4.0可以将这些影响文档构架的内容分离出去。我们就可以轻易的得到这样的需求:在改变布局样式的后不会破坏文档的内容。


What Should You do About it ?
你应该为此做些什么呢?

Do not use presentation attributes inside your HTML tags if you can avoid it. Start using styles! Please read our CSS tutorial to learn about style sheets.
尽量避免在HTML标签中避免使用一些会对布局有所影响的属性。开始学会使用样式!可以阅读我们的CSS教程来了解这方面信息

Do not use deprecated tags. Visit our complete HTML 4.01 Reference to see which tags and attributes that are deprecated.
尽量不要使用那些不被推荐的标签。浏览完整的HTML4.01参考看看哪些属性或是标签已经不再推荐使用了。


Prepare Yourself for XHTML
为XHTML做好准备

XHTML is the "new" HTML. The most important thing you can do is to start writing valid HTML 4.01. Also start writing your tags in lower case. Always close your tag elements. Never end a paragraph without </p>.
XHTML是新一代HTML。现在开始写些有效的HTML4.01并用小写标签,同时注意

NOTE: The official HTML 4.01 recommends the use of lower case tags.
注意:官方HTML4.01推荐使用小写标签

If you want to read about how this web site was converted to XHTML, please visit our XHTML tutorial.
如果你想阅读有关怎样将网站转换为XHTML的方法,可以参考我们的XHTML教程


Validate Your HTML Files as HTML 4.01
校验你的HTML文件

An HTML document is validated against a Document Type Definition (DTD). Before an HTML file can be properly validated, a correct DTD must be added as the first line of the file.
HTML文档依靠DTD来校验文档是否有效。在校验HTML文件是否有效以前,必须得有正确的DTD放置在文件的首行。

The HTML 4.01 Strict DTD includes elements and attributes that have not been deprecated or do not appear in framesets:
HTML4.01严密型DTD不包括那些不被推荐的元素和属性,并且不能在带有frameset的页面中出现:

<!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01//EN"

"http://www.w3.org/TR/html4/strict.dtd">

The HTML 4.01 Transitional DTD includes everything in the strict DTD plus deprecated elements and attributes:
HTML4.01过渡型DTD包含所有严密型DTD中所允许的内容还可以使用那些不被推荐的元素以及属性:

<!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN"

"http://www.w3.org/TR/html4/loose.dtd">

The HTML 4.01 Frameset DTD includes everything in the transitional DTD plus frames as well:
HTML4.01框架型DTD可包含过渡型以及框架

<!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Frameset//EN"

"http://www.w3.org/TR/html4/frameset.dtd">

 


Test Your HTML With the W3C Validator
使用W3C校验器来测试你的HTML

Input your page address in the box below
将你的页面地址输入下面的框框中


评论 (0) All

登陆 | 还没注册?