当前位置:首页 > 设计在线 > 平面动画 > Photoshop > HTML中DOCTYPE的定义及用法

HTML中DOCTYPE的定义及用法

点击次数:21 次 发布日期:2008-11-21 11:27:06 作者:源代码网
源代码网推荐

源代码网整理以下 

源代码网整理以下

以下为引用的内容:

源代码网整理以下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):

源代码网整理以下<!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):

源代码网整理以下<!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:

源代码网整理以下<!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):

源代码网整理以下<!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):

源代码网整理以下<!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!

源代码网整理以下<!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.

源代码网供稿.
网友评论 (0)
会员中心
设计在线
本站推荐
设计在线之精华