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

HTML/XHTML教程
网页设计中文本输入框的一些参数说明
XHTML CSS写出正规的BLOG
初学者接触HTML了解一些HTML标记(1)
网页设计学习XHTML应用小结
常用的XHTML标签的使用技巧介绍
HTML网页META标签内容写作规范要点
XHTML 1.0 参考
HTML的一些关于颜色方面的参考
你问我答:XML与HTML的区别
入门:HTML的基本标签和属性简单介绍
带有图片预览功能的上传表单的完整HTML
HTML表格标记教程(10):单元格边距属性CELLPADDING
HTML表格标记教程(11):水平对齐属性ALIGN
HTML表格标记教程(12):边框样式属性FRAME
HTML表格标记教程(8):背景图像属性BACKGROUND
HTML表格标记教程(9):单元格间距属性CELLSPACING
HTML表格标记教程(6):暗边框色属性BORDERCOLORDARK
HTML表格标记教程(7):背景颜色属性BGCOLOR
HTML表格标记教程(5):亮边框色属性BORDERCOLORLIGHT
HTML表格标记教程(3):宽度和高度属性WIDTH、HEIGHT

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


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