DTD is an acronym for Document Type Definition. It is a collection of markup declaration that defines a document type for HTML, XML, and SGML. A DTD defines the building blocks of a document by providing a list of attributes, comments, elements, and entities, along with their relationship with each other.