The DTD declaration always starts! DOCTYPE starts with a blank box followed by the name of the document root element. if it is an internal DTD, a blank box appears [], which is the content defined by the document type in brackets. for external DTD, it is divided into private DTD and public DTD. private DTD is represented by SYSTEM, followed by the external dtd url. the public dtd uses PUBLIC, followed by the dtd public name, followed by the dtd url. the DTD declaration always starts! DOCTYPE starts with a blank box followed by the name of the document root element. if it is an internal DTD, a blank box appears [], which is the content defined by the document type in brackets. for external DTD, it is divided into private DTD and public DTD. private DTD is represented by SYSTEM, followed by the external dtd url. the public dtd uses PUBLIC, followed by the dtd public name, followed by the dtd url.
Private DTD
Common DTD
Common DTD, in the format of "register // organization // type label // language ",
"Registration" indicates whether the organization is registered by the International Organization for Standardization (ISO). + indicates yes,-indicates no.
"Organization" is the name of the organization, such as W3C;
"Type" is generally DTD,
The "tag" specifies the description of the public text, that is, the unique descriptive name of the referenced public text, followed by the version number.
The last "language" is the ISO 639 language identifier of the DTD language. for example, EN indicates English and ZH indicates Chinese,
The following URL contains a complete list of ISO 639 language identifiers.
For example:
To! DOCTYPE starts,
Html is the name of the document root element,
PUBLIC indicates that it is a public dtd,
The name is followed by the DTD name. The name starting with-indicates that the non-ISO organization name is W3C, and the EN indicates that the DTD language is English,
The last is the dtd url.
Note: Although the document URL of the DTD can use relative or absolute URL, it is recommended to use absolute URL. for public DTD, if the interpreter can recognize its name, the DTD file on the URL is not viewed.
The preceding section details the DOCTYPE field in XML. For more information, see other related articles in the first PHP community!