A DTD is referred to as an internal DTD if elements are declared within the XML files. To reference it as internal DTD, standalone attribute in XML declaration must be set to yes.
An XML that describes a note that contains property to, from and message along with internal DTD will look like:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!DOCTYPE note [
<!ELEMENT note (to,from,message>
<!ELEMENT to (#PCDATA)>
<!ELEMENT from (#PCDATA)>
<!ELEMENT message (#PCDATA)>
]>
<note>
<to>Mr.X</to>
<from>Mr.Y</from>
<message>Stack Overflow is awesome </message>
</note>