HTML DOM methods are actions you can perform on HTML Elements.
HTML DOM properties are values of HTML Elements that you can set or change.
In the DOM, all HTML elements are defined as objects.
The programming interface is the properties and methods of each object.
A property is a value that you can get or set (like changing the content of an HTML element).
A method is an action you can do (like add or deleting an HTML element).
You don't have to do anything special to begin using the DOM.
document.getElementById("para").innerHTML = "Hello world";
The most common way to access an HTML element is to use the
id of the element.
In the example above the
getElementById() method used
id="para" to find the element.
The easiest way to get the content of an element is by using the
innerHTML property is useful for getting or replacing the content of HTML elements.
The reference section contains descriptions and examples of all DOM properties and methods.