Element

An element in a DTD is declared as:

    <!ELEMENT Element_name content_model >

where:

  • An exclamation mark (!) begins the declaration.
  • Element_name is the name of the element.
  • content_model can be the name of a child element.

For example, in the code snippet on the right, Messages is the name of an element and mail is the child element.

<!-- Structure of Message element in a DTD -->
<!ELEMENT Messages (mail)>
<!ELEMENT mail (to, from, subject, text)>
Click the Next button to continue.