Background


The Document Object Model is a model in which a document contains objects that have properties (attributes) and methods so that they can be manipulated.

This means that by accessing the DOM you are able to do the following:

Add, delete, and change elements
Change their contents
Add, delete, and change attributes

Both Netscape and Microsoft offered the ability to dynamically change HTML pages in version 4 of their browsers. This functionality was based on an HTML document object model. Unfortunately, the respective implementations were highly incompatible.

Some standards work was clearly needed, and so a DOM working group was formed within the W3 Consortium. Their work resulted in a W3C recommendation, dated October 1, 1998. The Consortium's work can be found at http://www.w3.org/TR/WD-DOM/.

This DOM specification, named Level 1, only defines interfaces in a generic way, using IDL (Interface Definition Language). It is up to the developers to implement the DOM spec for a given language (JavaScript, VBScript, Java, C++, Python, Perl, and so on).