A DTD defines a language by listing the elements that are permitted.
Every markup language has one.
Well-written HTML files contain a declaration that tells the browser which DTD to use. XML lets you create your own DTDs, using Declaration Syntax. Note, however, that unlike HTML, XML requires closing tags for all non-empty elements. Also, remember that DTDs are written in Declaration Syntax, while XML documents are written in Instance Syntax. Yes, it does get a bit complicated.