A Document Type Definitionlives in a filewhose name ends with .dtd. Inside this fileare items that. definetags (elements), attributes, and other beasties to be named later. There are two ways to connect a DTD with the content of an XML file: