|SGML Document Type Definition (DTD) file. DTD is a file extension for a Document Type Definition (DTD) file format used in SGML, XML, HTML or XHTML to identify what the variables (or markup) are that format a document.