An attribute extends an HTML or XML element, changing its behavior or providing metadata.
Explore HTML attributes, their values, and how they configure elements or adjust behavior to meet user criteria on MDN Web Docs.
The Element.attributes property returns a live collection of all attribute nodes registered to the specified node. It is a NamedNodeMap, not an Array, so it has no Array methods and the Attr nodes' indexes may differ among browsers. To be more specific, attributes is a key/value pair of strings that represents any information regarding that attribute.
The Attr interface represents one of an element's attributes as an object. In most situations, you will directly retrieve the attribute value as a string (e.g., Element.getAttribute()), but some cases may require interacting with Attr instances (e.g., Element.getAttributeNode()). EventTarget Node Attr The core idea of an object of type Attr is the association between a name and a value. An ...
This HTML reference describes all elements and attributes of HTML, including global attributes that apply to all elements.
The attr() CSS function is used to retrieve the value of an attribute of the selected element and use it in a property value, similar to how the var() function substitutes a custom property value. It can also be used with pseudo-elements, in which case the attribute's value on the pseudo-element's originating element is returned.
The getAttribute() method of the Element interface returns the value of a specified attribute on the element.
The CSS attribute selector matches elements based on the element having a given attribute explicitly set, with options for defining an attribute value or substring value match.