[XHTML tutorial] Moving to the XHTML standard (5) (xhtml dtd)

Source: Internet
Author: User
Tags tidy
Address: http://www.w3schools.com/xhtml/xhtml_syntax.asp
Translation: Fan weixiao

The XHTML standard defines three document type definitions.
The most common is the XHTML transitional.
The XHTML standard defines three types of documents, the most common of which is the XHTML transition type definition.

The <! Doctype> is mandatory
<! Doctype> mark is mandatory
An XHTML document consists of three main parts:
An XHTML document consists of the following three main parts:
The doctype
The head
The body

the basic document structure is:
the basic document structure is:



...

...

The doctype declaration shoshould always be the first line in An XHTML document.
The doctype statement always appears in the first line of An XHTML document.

An XHTML example
An example of XHTML
This is a simple (minimal) XHTML document:
This is an example of a simple XHTML document.
<! 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 Declaration defines the Document Type
<! 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:
the rest of the document looks like HTML


simple document


A simple paragraph



the 3 Document Type Definitions
three document types
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 parameters of a particle 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 specifies the syntax of a webpage under SGML (General Markup Language Standard)
2. the DTD is used by the SGML application Program , such as HTML. to indicate the tag rules for a specific type of documents, it includes a setting for the element and the entire object declaration.
3. XHTML is specified in a SGML document type or DTD
4. the precise description of xhtml dtd allows computers to recognize languages that can be used by syntax and XHTML markup syntax.
there are currently 3 XHTML document types:
three XHTML document types:
strict
transitional
frameset
strict
transitional
framework

XHTML 1.0 specifies three XML document types that correspond to three dtds: strict, transitional, and frameset.
XHTML 1.0 specifies three types of XML documents to adapt to the three types of DTD: strict, transition and framework

XHTML 1.0 strict
strict
use this when you want really clean markup, free of presentational clutter. use this together with Cascading Style Sheets.
when you want to clean and tidy the labels, avoid confusion in the presentation layer, use it with CSS

XHTML 1.0 transitional
transition type
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.
You can use the transition type when you need to fully utilize the features of the HTML presentation layer or when you want to support browsers that do not support 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.
When you use the HTML framework to split a browser window into two or more, use the framework structure.

(For more information, see the source)

The <! Doctype> is mandatory
<! Doctype> mark is mandatory
An XHTML document consists of three main parts:
An XHTML document consists of the following three main parts:
The doctype
The head
The body

The basic document structure is:
The basic document structure is:
<! Doctype...>
<HTML>
<Head>
<Title>... </title>
</Head>
<Body>... </body>
</Html>

The doctype declaration shoshould always be the first line in An XHTML document.
The doctype statement always appears in the first line of An XHTML document.

An XHTML example
An example of XHTML
This is a simple (minimal) XHTML document:
This is an example of a simple XHTML document.
<! 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 Declaration defines the Document Type
<! 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:
the rest of the document looks like HTML


simple document


A simple paragraph



the 3 Document Type Definitions
three document types
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 parameters of a particle 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 specifies the syntax of a webpage under SGML (General Markup Language Standard)
2. DTD is used by SGML applications, such as HTML. to indicate the tag rules for a specific type of documents, it includes a setting for the element and the entire object declaration.
3. XHTML is specified in a SGML document type or DTD
4. the precise description of xhtml dtd allows computers to recognize languages that can be used by syntax and XHTML markup syntax.
there are currently 3 XHTML document types:
three XHTML document types:
strict
transitional
frameset
strict
transitional
framework

XHTML 1.0 specifies three XML document types that correspond to three dtds: strict, transitional, and frameset.
XHTML 1.0 specifies three types of XML documents to adapt to the three types of DTD: strict, transition and framework

XHTML 1.0 strict
strict
use this when you want really clean markup, free of presentational clutter. use this together with Cascading Style Sheets.
when you want to clean and tidy the labels, avoid confusion in the presentation layer, use it with CSS

XHTML 1.0 transitional
transition type
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.
You can use the transition type when you need to fully utilize the features of the HTML presentation layer or when you want to support browsers that do not support 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.
When you use the HTML framework to split a browser window into two or more, use the framework structure.

(For more information, see the source)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.