DTD files are called document type definition files. In DTD files are text files that contain, among other things, element types, element attributes, and notations, and specify their order and nesting. A DTD file defines the structure of other XML, SGL, HTML or XHTML documents.
Usually DTD files in a web page are referenced via a URL, so often the xhtml1-transitional.Dtd or xhtml1-strict.Dtd is included via DOCTYPE statement. Furthermore, DTD files are also used to validate documents. For example, XML documents can be checked for correct structure and element properties to ensure that they can be read correctly.
DTD files can be opened and edited in any text editor, but can only be used with an XML editor or other programs that can parse XML, XHTML, HTML or SGL.