HTML DOM techniques are actions you can perform (on HTML Elements).
HTML DOM properties are values (of HTML Elements) that you can set or change.
The DOM Programming Interface
In the DOM, all HTML components are characterized as objects.
The programming interface is the properties and techniques for each object.
A property is an esteem that you can get or set (like changing the substance of a HTML element).
A method is an activity you can do (like include or then again erasing a HTML element).
The following model changes the substance (the innerHTML) of the <p> component with id="demo":
document.getElementById("demo").innerHTML = "Hello World!";
In the precedent above, getElementById is a method, while innerHTML is a property.
The getElementById Method
The most normal approach to get to a HTML component is to utilize the id of the element.
In the precedent over the getElementById strategy utilized id="demo" to discover the element.
The innerHTML Property
The most effortless approach to get the substance of a component is by utilizing the innerHTML property.
The innerHTML property is helpful for getting or supplanting the substance of HTML elements.