ELI5: Explain Like I'm 5

Document type definition

A Document Type Definition (DTD) is like a set of rules for how a document should be written and organized. It tells computers how to understand and interpret the content of an XML document, so that it can be properly displayed. DTDs can make sure that only certain types of information are put in a document and that it is put in the right place. For example, if a DTD said that a phone number must always be in a certain format, it would make sure that the phone number was written correctly.