DTDThe declaration always starts with !DOCTYPE, followed by a blank space followed by the name of the document root element. If it is an internal DTD, then a blank space appears [], and the document type definition is enclosed in square brackets. The content of the external DTD is divided into private DTD and public DTD. The private DTD is represented by SYSTEM, followed by the URL of the external DTD. The public DTD is represented by PUBLIC, followed by the DTD public name, followed by the URL of the DTD.
Private DTD
<!DOCTYPErootSYSTEM "http://www.test.org/test.dtd" >
Public DTD
<!DOCTYPEhtmlPUBLIC "-//W3C//DTDXHTML1.0Transitional//EN" "http://www.w3.org/TR/xhtml/DTD/xhtml1-transitional.dtd" >
Public DTD, the DTD name format is "Registration//Organization//Type Tag//Language",
"Registration" indicates whether the organization is registered by the International Organization for Standardization (ISO), + means yes, - means no.
"Organization" is the name of the organization, such as: W3C;
"Type" Generally it is a DTD,
"tag" is a designated public text description, that is, the unique descriptive name of the referenced public text, which can be followed by a version number.
The last "language" is the ISO 639 language identifier of the DTD language, such as: EN means English, ZH means Chinese, There is a complete list of ISO 639 language identifiers at the following addressFor example:<!DOCTYPEhtmlPUBLIC "-//W3C//DTDXHTML1.0Transitional//EN" "http://www.w3.org/TR/xhtml/DTD/xhtml1-transitional.dtd" >
The above is the detailed content of Detailed introduction to the DOCTYPE field in XML. For more information, please follow other related articles on the PHP Chinese website!