Meaningful electronic processing of documents depends on consistency among documents of the same class. The DTD is the basis for consistent mark up. The DTD file itself is an SGML file. In addition to identifying the available tags, the DTD also includes comments that help the user apply the tags appropriately. The DTD also specifies element attributes.
Attributes are settings that can be varied within elements.
Most attributes have default settings and do not have to be set explicitly. Other attributes are identified as required and must be set by the encoder. Using such a program reduces the need to remember which tags are valid under which conditions and requiring which attributes. But looking at the DTD can help identify optional elements or attributes that could enhance mark-up. Although the DTD does provide a basis for consistency of mark-up, most provide a wide range of options.