HTML - Attribute


An attribute in HTML is an XML attribute of an HTML element



Attribute names are case-insensitive.


Classes and IDs are attributes used in the selection of element. Class and ID names cannot begin with numerals; they must begin with alphabetic characters.


Order does not matter but some attributes are more searched (ie have more functionality) while reading HTML.

The code guide gives the following order that reflects this idea

Without any value

See HTML - Boolean Attribute

How to access HTML Attribute via Javascript

See Attribute manipulation with DOM

How to track the modification of values?

See How to use MutationObserver to track mutation on the DOM ?

Note on Body attributes modifications: If a document has two body elements, it's possible that the browser will overwrite the attributes of the first body element with the attributes of the second.

Discover More
CSS - Attr function (attribute)

The attr function select the value of an attribute where:
HTML - AutoComplete

autocompletion in HTML will be find: in the HTML autocomplete attribute implemented in the datalist element or via a implementation/library The autocomplete attribute permits to fill forms with...
HTML - Checked

checked is an HTML attribute that indicates via its value (true or false - default to true) if the form control element is checked. It's used: in a checkbox or radio button select optionselected...
HTML - Data attributes

Data (Key value) can be included for processing by a script using the data-=“” attributes. css attribute function Output: With an attribute selector, you can select the nodes with a certain...
Html Script Async Vs Defer
HTML - Defer attribute

defer is an boolean attribute of script element that indicates to the user agent (browser) that it should execute the script: after the DOM has been created (the HTML document read entirely and has...
HTML - Global (Element) Attribute

The global-attributesglobal attributes are common attribute to all elements in the HTML language.
HTML - Integrity attribute

integrity is an attribute of the fetch elements. Its value is a digest that controls that the file was not altered in transit. It's a data integrity functionality. If the calculation output with...
Name attribute

name is a html attribute that specifies the name model property and is a identifier attribute. For a script element, the name attribute takes precedence over an id attribute if both are set.
Data System Architecture
Tree - Attribute

A value associated with an node (element) of a tree, consisting of a name, and an associated (textual) value.

Share this page:
Follow us:
Task Runner