Like HTML elements, XML elements can have attributes. Because a document’s elements are completely configurable, you’re free to create as many attributes as necessary. However, all attributes used in a valid document must be declared in the document type definition (DTD). Otherwise the document can’t be said to be valid.
The following sections examine the fundamental concepts you’ll need to define attributes in DTDs. You’ll learn how to
Make attribute assignments
Specify attribute names, types, and default usages
Assign values to attributes in DTDs
After these sections you’ll find a complete discussion on declaring the five standard types of attributes in DTDs.