[XHTML Tutorial] 走向XHTML标准 (5)(XHTML DTD)
来源:互联网 发布:php考勤系统源码免费 编辑:程序博客网 时间:2024/05/21 17:19
翻译:范维肖
The XHTML standard defines three Document Type Definitions. The <!DOCTYPE> Is Mandatory The basic document structure is: The DOCTYPE declaration should always be the first line in an XHTML document. The DOCTYPE declaration defines the document type: The rest of the document looks like HTML: The 3 Document Type Definitions XHTML 1.0 specifies three XML document types that correspond to three DTDs: Strict, Transitional, and Frameset. Use this when you need to take advantage of HTML's presentational features and when you want to support browsers that don't understand Cascading Style Sheets. XHTML 1.0 Frameset Use this when you want to use HTML Frames to partition the browser window into two or more frames.
The most common is the XHTML Transitional.
XHTML标准定义了三种文档类型定义,而其中最普通的是XHTML过渡型类型定义
<!DOCTYPE>标记是强制性的
An XHTML document consists of three main parts:
一个XHTML文档是由下面三个主要部分构成的
the DOCTYPE
the Head
the Body
基本的文档结构是:
<!DOCTYPE ...>
<html>
<head>
<title>... </title>
</head>
<body> ... </body>
</html>
DOCTYPE的声明应该总是出现在一个XHTML文档的第一行
An XHTML Example
一个XHTML的例子
This is a simple (minimal) XHTML document:
这是一个简单的XHTML文档的例子
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>simple document</title>
</head>
<body>
<p>a simple paragraph</p>
</body>
</html>
DOCTYPE的声明定义了文档类型
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
文档剩下的部分看起来比较像HTML了
<html>
<head>
<title>simple document</title>
</head>
<body>
<p>a simple paragraph</p>
</body>
</html>
3种文档类型定义
1.DTD specifies the syntax of a web page in SGML.
2.DTD is used by SGML applications, such as HTML, to specify rules that apply to the markup of documents of a particular type, including a set of element and entity declarations.
3.XHTML is specified in an SGML document type definition or 'DTD'.
4.An XHTML DTD describes in precise, computer-readable language the allowed syntax and grammar of XHTML markup.
1.DTD指明了在SGML(通用标记语言标准)下的网页的语法
2.DTD被SGML应用程序所使用,像HTML,为了指明一种特定类型文档的标记的规则,它包括一个对元素和整个实体声明的设定。
3.XHTML被指定在一个SGML文档类型或DTD中
4.XHTML DTD的精确描述,使得计算机能够识别的语言允许语法和XHTML标记的文法可以使用。
There are currently 3 XHTML document types:
三种XHTML文档类型:
STRICT
TRANSITIONAL
FRAMESET
严格型
过渡型
框架型
XHTML 1.0指明了三种XML文档类型来适应三种DTD:严格型,过渡型和框架型
XHTML 1.0 Strict
严格型
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> Use this when you want really clean markup, free of presentational clutter. Use this together with Cascading Style Sheets.
当你想要整洁干净的标记,避免表现层的混乱,把它和CSS一起使用
XHTML 1.0 Transitional
过渡型
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
当你需要充分利用HTML的表现层的特性或者当你想支持那些不支持CSS的浏览器的时候你可以使用过渡型。
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
当你使用HTML框架把一个浏览器窗口分割成两个或多个时候使用框架型结构
(转载请注明出处)
The <!DOCTYPE> Is Mandatory
<!DOCTYPE>标记是强制性的
An XHTML document consists of three main parts:
一个XHTML文档是由下面三个主要部分构成的
the DOCTYPE
the Head
the Body
The basic document structure is:
基本的文档结构是:
<!DOCTYPE ...>
<html>
<head>
<title>... </title>
</head>
<body> ... </body>
</html>
The DOCTYPE declaration should always be the first line in an XHTML document.
DOCTYPE的声明应该总是出现在一个XHTML文档的第一行
An XHTML Example
一个XHTML的例子
This is a simple (minimal) XHTML document:
这是一个简单的XHTML文档的例子
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>simple document</title>
</head>
<body>
<p>a simple paragraph</p>
</body>
</html>
The DOCTYPE declaration defines the document type:
DOCTYPE的声明定义了文档类型
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
The rest of the document looks like HTML:
文档剩下的部分看起来比较像HTML了
<html>
<head>
<title>simple document</title>
</head>
<body>
<p>a simple paragraph</p>
</body>
</html>
The 3 Document Type Definitions
3种文档类型定义
1.DTD specifies the syntax of a web page in SGML.
2.DTD is used by SGML applications, such as HTML, to specify rules that apply to the markup of documents of a particular type, including a set of element and entity declarations.
3.XHTML is specified in an SGML document type definition or 'DTD'.
4.An XHTML DTD describes in precise, computer-readable language the allowed syntax and grammar of XHTML markup.
1.DTD指明了在SGML(通用标记语言标准)下的网页的语法
2.DTD被SGML应用程序所使用,像HTML,为了指明一种特定类型文档的标记的规则,它包括一个对元素和整个实体声明的设定。
3.XHTML被指定在一个SGML文档类型或DTD中
4.XHTML DTD的精确描述,使得计算机能够识别的语言允许语法和XHTML标记的文法可以使用。
There are currently 3 XHTML document types:
三种XHTML文档类型:
STRICT
TRANSITIONAL
FRAMESET
严格型
过渡型
框架型
XHTML 1.0 specifies three XML document types that correspond to three DTDs: Strict, Transitional, and Frameset.
XHTML 1.0指明了三种XML文档类型来适应三种DTD:严格型,过渡型和框架型
XHTML 1.0 Strict
严格型
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> Use this when you want really clean markup, free of presentational clutter. Use this together with Cascading Style Sheets.
当你想要整洁干净的标记,避免表现层的混乱,把它和CSS一起使用
XHTML 1.0 Transitional
过渡型
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Use this when you need to take advantage of HTML's presentational features and when you want to support browsers that don't understand Cascading Style Sheets.
当你需要充分利用HTML的表现层的特性或者当你想支持那些不支持CSS的浏览器的时候你可以使用过渡型。
XHTML 1.0 Frameset
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
Use this when you want to use HTML Frames to partition the browser window into two or more frames.
当你使用HTML框架把一个浏览器窗口分割成两个或多个时候使用框架型结构
(转载请注明出处)
- [XHTML Tutorial] 走向XHTML标准 (5)(XHTML DTD)
- [XHTML Tutorial]XHTML指南-走向XHTML标准
- [XHTML Tutorial] 走向XHTML标准 (7)(XHTML Modularization)
- [XHTML Tutorial] 走向XHTML标准 (6)(XHTML HOWTO)
- [XHTML Tutorial] 走向XHTML标准 (4)(XHTML Syntax)
- [XHTML Tutorial] 走向XHTML标准 (2)(Why XHTML)
- [XHTML Tutorial] 走向XHTML标准 (1)(Introduction to XHTML)
- [XHTML Tutorial] 走向XHTML标准 (3)(Differences Between XHTML And HTML)
- XHTML DTD
- XHTML
- XHTML
- xhtml
- XHTML
- XHTML
- xhtml
- XHTML
- XHTML
- XHTML
- [XHTML Tutorial] 走向XHTML标准 (7)(XHTML Modularization)
- [XHTML Tutorial] 走向XHTML标准 (6)(XHTML HOWTO)
- 完全用GNU/Linux工作,摈弃Windows低效率的工作方式
- C#中实现文件拖放打开的方法
- 宇宙仍然正在被暗能量驱动着不断地膨胀
- [XHTML Tutorial] 走向XHTML标准 (5)(XHTML DTD)
- 我和ERP的故事:一个女CIO的诞生 (1)--作者:汴梁牛二
- [XHTML Tutorial] 走向XHTML标准 (4)(XHTML Syntax)
- 网络数据加密的三种技术
- Java 相关的编译技术
- Csdn的Websphere专题
- C#中一些字符串操作的常用用法
- [XHTML Tutorial] 走向XHTML标准 (3)(Differences Between XHTML And HTML)
- [XHTML Tutorial] 走向XHTML标准 (2)(Why XHTML)