HTML CSS Reference/HTML Tag Reference/ DOCTYPE

Материал из Web эксперт
Перейти к: навигация, поиск

"!DOCTYPE" Syntax and Note

   <source lang="html4strict">

Note: Specifies the document type definition (DTD) and must appear before the HTML tag.

Syntax:

<!DOCTYPE TopElement Availability "-//Organization//Type LanguageVersion Definition//LanguageCountry">

Correct syntax requires that the attribute values be specified without attribute names, as in the following examples:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">

<!DOCTYPE> Specific Attributes Ordered by Syntax

Attribute Name Note


+-----------------+--------------------------------------------------------

Top Element Specifies the markup language used in the document.

                 The default value is HTML.
                 

+-----------------+--------------------------------------------------------

Availability Specifies whether the DTD is publicly accessible or

                 is available as a system resource.
                                 
                 Values:  PUBLIC   Indicates the DTD is publicly accessible; the default value
                          SYSTEM   Indicates a local DTD file or a URL that points to a DTD file 

+-----------------+--------------------------------------------------------

Organization Specifies the organization responsible for

                 the creation and maintenance of the DTD being used.
                 
                 Values: W3C or IETF.

+-----------------+--------------------------------------------------------

Type Specifies the type of object used in the page.

                 The default value is DTD.
                 

+-----------------+--------------------------------------------------------

Language Version Specifies the version of the markup language used for the document.

                 The default value is HTML 4.0.
                 

+-----------------+--------------------------------------------------------

Definition Define the document type.

                 If no value is specified, the document can make use of any of the types.
                 
                 Values: frameset     For frameset documents
                         strict       Supports mainly style sheets
                                      transitional Does not contain frameset elements

+-----------------+--------------------------------------------------------

Language Country Specifies the language used in the document (Spanish, English, and so on).



     </source>