A document type definition is a formal set of declarations that defines the permitted structure and markup rules for an XML or SGML document type.
DTDs remain important in legacy structured-authoring environments and some XML documentation standards. They help writers and tools validate whether a document follows the required element structure.