DTD has two types of declarations internal and external.I have given you brief information of internal and external DTD.
1. Internal DTD Declaration : I have given you a syntax using them you can declare internal DTD in our XML file.
<!DOCTYPE root-element [element-declarations]>
Example: Now I used internal DTD in XML file like that,
<!DOCTYPE note [
<!ELEMENT note (to,from,heading,body)>
<!ELEMENT to (#PCDATA)>
<!ELEMENT from (#PCDATA)>
<!ELEMENT heading (#PCDATA)>
<!ELEMENT body (#PCDATA)>
<body>Recently R4R given a VoiceBox facility using them you can chat with R4R</body>