HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
Document Type Definition (DTD) to define the legal building blocks of an XML document. It uses a series of legal elements to define the structure of the document.
DTD can be declared in rows in an XML document, or as an external reference.
If the DTD is included in your XML source file, it should adopt the following syntax wrapped in a DOCTYPE declaration:
XML document instance with the DTD (please IE5 and higher versions of Open and select view source):
Open this XML file in your browser, and select "View Source" command.
The DTD above is interpreted like this:
If the DTD is located in an external XML source files, then it should be wrapped in a DOCTYPE definition with the following syntax:
This is the same XML documents and XML document above, but does have an external DTD: ( click to open the file and select "View Source" command.)
This is the "note.dtd" file contains the DTD:
By DTD, each of your XML files can carry a description of its own format.
By DTD, independent groups can consistently use a standard DTD to exchange data.
And your application can also use a standard DTD to verify the data received from the outside.
You can also use a DTD to verify your own data.