What purpose does DTD serve?
A DTD's function is to specify the XML document's enforceable building blocks. A list of legal components that define the document's structure is included. Either an external reference or an inline declaration of a DTD can be used in your XML document.