XML Element Attributes

An XML attribute may be included with element declarations. XML Attributes are name/value pairs that may be associated with the element. XML attributes may be used to control some characteristics of the element. In the markup document attributes are used with the following form:

<ELEMENTNAME Importance="minimal">

Rules for XML attribute names are the same as rules for XML element names. The attribute name may only appear once in the element start tag. The double or single quoted string may be used to delimit the attribute value. The attribute value may not contain the < character. The attribute value can only include the & character when using an entity or character reference.

The DTD determines which element attributes are required and what the defaults are. Read the DTD Reference manual on this website for more information about writing DTDs and specifying element attributes.