 In XML, an attribute is a markup construct consisting of a name/value pair that exists within a start-tag or empty-element tag.Markup languages, such as HTML and XML, use attributes to describe data and the formatting of data.A good example is the process of XML assigning values to properties (elements).