标题: HTML DOCTYPE Definition and Usage - doctype的定义及用法
aileenfangfang
新生入学
Rank: 1



UID 214440
精华 0
积分 10(积分有什么用?)
帖子 4
阅读权限 10
注册 2007-10-16
状态 离线
发表于 2007-11-10 17:22  资料  个人空间  主页 短消息  加为好友 
HTML DOCTYPE Definition and Usage - doctype的定义及用法

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

Note: The <!DOCTYPE> 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 [www.52css.com]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">


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 [www.52css.com]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">


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 [www.52css.com]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">


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 [www.52css.com]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

  
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 [www.52css.com]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


XHTML Frameset DTD

Use this DTD when you want to use frames!

Example Source Code [www.52css.com]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">


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


上海搬场 搬家公司 上海搬家公司 上海搬场公司 搬场公司 搬家公司 上海搬场 上海搬家公司 搬家 搬场公司 上海搬场公司 上海搬家 上海搬家





搬场
顶部
不容错过的IBM 集群技术资源汇总
 



当前时区 GMT+8, 现在时间是 2008-5-18 11:18

    Powered by Discuz! 5.5.0  © 2001-2007 Comsenz Inc.
Processed in 0.070333 second(s), 5 queries

清除 Cookies - 联系我们 - Linux伊甸园 - Archiver - WAP