Internal DTD

Whether you use an external or internal DTD, the actual syntax for the DTD is the same — the same code could just as easily be part of an internal DTD or an external one. The only difference between internal and external is in the way it's declared with DOCTYPE.

Using an internal DTD, the code is placed between the DOCTYPE tags (eg, <!DOCTYPE tutorials [ and ]>.

Example Internal DTD

This is an example of an internal DTD. It's internal because the DTD is included in the target XML document: