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

HTML/XHTML教程
如何以及何时使用sIFR
提交表单后转到另一个文件
表格标签(table)深入了解
容易混淆使用位置的XHTML标签
类型File的Input按钮功能研究
注册表单设计的规则
W3C建议的移动Web标记语言XHTML Basic 1.1
超级链接a的提示方式和打开方式
超级链接a的表现形式和打开方式
xhtml css网页制作问题的解决方法
网页注释在IE中产生文字溢出
HTML教程:有序列表
HTML教程:无序列表
HTML网页制作的强大8条技巧
blockquote标记应用注意
X/HTML5 和 XHTML2
以HTML网页实例说明head区代码的意思
XHTML标记要合理使用
DOCTYPE类型详细介绍
表单Form的submit事件不响应

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-28   浏览: 29 ::
收藏到网摘: 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