Chinaunix首页 | 论坛 | 博客
  • 博客访问: 750200
  • 博文数量: 741
  • 博客积分: 6000
  • 博客等级: 准将
  • 技术积分: 4825
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-18 11:18
文章分类

全部博文(741)

文章存档

2011年(1)

2008年(740)

我的朋友

分类:

2008-09-18 11:31:46

The declaration is the very first thing in your document, before the tag. This tag tells the browser which HTML or XHTML specification the document uses.

Note: The tag does not have an end tag!

HTML
HTML 4.01 specifies three document types: Strict, Transitional, and Frameset.


HTML Strict DTD

Use this when you want clean markup, free of presentational clutter. Use this together with Cascading Style Sheets (CSS):

Example Source Code []


HTML Transitional DTD

The Transitional DTD includes presentation attributes and elements that W3C expects to move to a style sheet. Use this when you need to use HTML's presentational features because your readers don't have browsers that support Cascading Style Sheets (CSS):

Example Source Code []


Frameset DTD
The Frameset DTD should be used for documents with frames. The Frameset DTD is equal to the Transitional DTD except for the frameset element replaces the body element:

Example Source Code []


XHTML
XHTML 1.0 specifies three XML document types: Strict, Transitional, and Frameset.


XHTML Strict DTD

Use this DTD when you want clean markup, free of presentational clutter. Use this together with Cascading Style Sheets (CSS):

Example Source Code []

  
XHTML Transitional DTD

Use this DTD when you need to use XHTML's presentational features because your readers don't have browsers that support Cascading Style Sheets (CSS):

Example Source Code []


XHTML Frameset DTD

Use this DTD when you want to use frames!

Example Source Code []


To check that you have written a valid XHTML document with a correct DTD,  you can link your XHTML page to an XHTML validator.




--------------------next---------------------

阅读(335) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~