What is the DTD?
The DTD is Document Type Definition that explains the formation of the content of an XML document. The DTD manages the data to keep in a consistent format. It explains the XML elements and attributes about how they should be show in XML documents and what relation they should have with other attributes and elements. The DTD also permits you to mention whether an XML element is optional or not. If the XML documents are not according to the DTD rules, they are not taken valid.