HTML DOM Properties and Methods


Properties and methods define the programming interface of the HTML DOM.

Programming Interface
In the DOM, HTML documents consist of a set of node objects. The nodes can be accessed with JavaScript or other programming languages. In this course we will use JavaScript. The programming interface of the DOM is defined by standard properties and methods. Properties are often referred to as something that is (e.g., the name of a node). Methods are often referred to as something that is done (e.g., remove a node).

HTML DOM Properties
Some DOM properties: Note that in the list above, x is a node object (HTML element).

HTML DOM Methods
Some DOM methods: Note that in the list above, x is a node object (HTML element).


Demonstration
The following demonstration shows how the script of HTML and JavaScript is displayed on the Web.

     





      If God had really intended man to fly,    
      He’d make it easier to get to the airport.    
      — Jonathan Winters