Document Type Definition
Sign in to saveAlso known as DTD
set of markup declarations that define a document type for an SGML-family markup language
~38 min read
Encyclopedic overview
A document type definition (DTD) is a specification file that contains a set of markup declarations that define a document type for an SGML-family markup language (GML, SGML, XML, HTML). The DTD specification file can be used to validate documents.
A DTD defines the valid building blocks of an XML document. It defines the document structure with a list of validated elements and attributes. A DTD can be declared inline inside an XML document, or as an external reference.
Excerpted from Wikipedia’s “Document Type Definition” article, available under the CC BY-SA 4.0 licence.