XML provides mechanisms to impose constraints on the documents storage layout and logical structure. One of these mechanisms is the schema.
There are several XML schema languages. The original and most broadly supported schema language (also defined by the XML 1.0 specification) is the Document Type Definition (DTD).
The DTD defines a collection of element and attribute names that are allowed in the document. It also defines the relationship between these names (which element is allowed as a child of which, which attribute is allowed on which element, etcetera). This collection is sometimes referred to as an XML grammar, and sometimes an XML language.
Example: The XHTML 1.0 DTD defines that the element name for paragraph is "p". In the document it should read as follows:
<p>This is a paragraph</p>