当前位置: 首页 > 图文教程 > 网页制作 > HTML/XHTML教程 > W3C推荐的 DTDs(文件类型声明)

HTML/XHTML教程
理解表现和结构相分离
HTML语言剖析(一)Html简介
HTML语言剖析(二)HTML标记一览
HTML语言剖析(三)文件标记
HTML语言剖析(四)排版标记
HTML语言剖析(五)字体标记
HTML语言剖析(六)清单标记
采访Eric Meyer的10个问题
Flash页面如何通过校验
为什么要抛弃HTML
典型的三行二列居中高度自适应布局
盒模型bug的解决方法
用!important解决IE和Mozilla的布局差别
使用DIV之后,什么时候使用TABLE
同一个页面用多个id有什么影响
定义标题的最好方法
左中右3栏布局中最先显示中栏内容的方法
alt属性和title属性
在IE中为abbr标签加样式
HTML4标签的默认样式列表

HTML/XHTML教程 中的 W3C推荐的 DTDs(文件类型声明)


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

When authoring document is HTML or XHTML, it is important to Add a Doctype declaration. The declaration must be exact (both in spelling and in case) to have the desired effect, which makes it sometimes difficult. To ease the work, below is a list of recommended declarations that you can use in your Web documents.

Template

Use the following markup as a template to create a new XHTML 1.0 document using a proper DOCTYPE. See the list below if you wish to use another document type.

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>	<title>An XHTML 1.0 Strict standard template</title>	<meta http-equiv="content-type"	content="text/html;charset=utf-8" />	<meta http-equiv="Content-Style-Type" content="text/css" />
</head>
<body> <p>… Your HTML content here …</p>
</body>
</html>

DTD List

HTML 4.01 - Strict, Transitional, Frameset:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">	
XHTML 1.0 - Strict, Transitional, Frameset:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">	
XHTML 1.1 - DTD:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">	
XHTML Basic 1.0 - DTD:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">	
XHTML Basic 1.1 - DTD:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">	
HTML 2.0 - DTD:
<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN">
HTML 3.2 - DTD:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
MathML 1.01 - DTD:
<!DOCTYPE math SYSTEM	"http://www.w3.org/Math/DTD/mathml1/mathml.dtd">	
MathML 2.0 - DTD:
<!DOCTYPE math PUBLIC "-//W3C//DTD MathML 2.0//EN"	"http://www.w3.org/TR/MathML2/dtd/mathml2.dtd">	
XHTML + MathML + SVG - DTD:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">	
SVG 1.0 - DTD:
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"	"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">	
SVG 1.1 Full - DTD:
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"	"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">	
SVG 1.1 Basic - DTD:
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN"	"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">	
SVG 1.1 Tiny - DTD:
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN"	"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">	
XHTML + MathML + SVG Profile (XHTML as the host language) - DTD:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">	
XHTML + MathML + SVG Profile (Using SVG as the host) - DTD:
<!DOCTYPE svg:svg PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">	

List of DTDs for the CSS validator.

Authoring tools MUST NOT use the following list.

HTML 4.0
http://www.w3.org/TR/1998/REC-html40-19980424/strict.dtd
http://www.w3.org/TR/1998/REC-html40-19980424/loose.dtd
http://www.w3.org/TR/1998/REC-html40-19980424/frameset.dtd
HTML 4.01
http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd
http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd
http://www.w3.org/TR/1999/REC-html401-19991224/frameset.dtd
XHTML 1.0
http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-strict.dtd
http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-transitional.dtd
http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-frameset.dtd
XHTML 1.1
http://www.w3.org/TR/2001/REC-xhtml11-20010531/DTD/xhtml11.dtd