Difference between attribute and property in HTML

Definition of HTML attribute and HTML property

The difference between an attribute and a property is analogous to the difference between a tag and an element.

An attribute in HTML is a named property associated with an element as coded in the serialized form of an HTML document. In a marked-up document, attribute name/value pairs can be coded in a start tag or a standalone tag between the element name and the tag's terminating > or /> delimiter separated from the element name and other attributes by whitespace. The code for an HTML attribute always consists of the attribute name, an equal sign (=) and the value of the property enclosed in quotes, even if the attribute is a boolean attribute.

A property is a named characteristic of something in the internal model of an HTML document. The value of the property may be set by an attribute in the serialized form of an element, inherited from a parent element in the hierarchical model of the document or set to some default value.