HTML - Attribute

About

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

Property

Name

Attribute names are case-insensitive.

Special

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

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 What are Boolean Attribute in HTML ?

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 - Global (Element) Attribute

The global-attributesglobal attributes are common attribute to all elements in the HTML language.
HTML - Integrity attribute (SRI | Source Resource Integrity)

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.
What are Boolean Attribute in HTML ?

A number of attributes are boolean attributes . The presence of a boolean attribute on an element represents the true value, The absence of the attribute represents the false value. The values...
What are the HTML /XML Reserved Character/Word and how to escape them ?

This page is the reserved word/characters of XML based language. If a reserved character is in : the value of an attribute, it should be first encoded in a entity the node value: in Xml: you...



Share this page:
Follow us:
Task Runner