DTDs are usually authored and maintained using either a text editor or an application designed specifically for DTD authoring.
For writing relatively simple and short DTDs, or for making isolated changes to an existing DTD, you can use Notepad or a similar program that allows you to edit and save files as text. For more extensive DTD editing, the following are some third party applications you might want to consider evaluating or purchasing:
Authoring a solid DTD presents a number of design challenges. For more information about DTDs, you can consult the following references:
These books include detailed or advanced discussions of issues that affect DTD design. You might find them helpful if you need to learn about DTDs in more depth.
What is a DTD? | Introduction to DTD Syntax