THE DOCUMENT OBJECT MODEL

The DOM is a tree-like structure that represents all the content and components of a Web document. The DOM allows you to access elements with scripts such as event handlers.

There are currently four DOM Levels:

  • DOM Level 0 allows event handlers to access only the <form>, <img>, and <a> elements.
  • DOM Level 1 makes all elements on the page accessible to scripting. This DOM is also known as the W3C DOM. This DOM was created mainly for XML, but also includes HTML.
  • DOM Level 2 adds further access to elements in XML documents, and adds further support for accessing and manipulating style sheets.
  • DOM Level 3 is still in development. It includes five different components, three of which are still considered working drafts.

The newest browsers, Netscape 6+ and Internet Explorer 6, support the level 1 DOM, and Netscape 6+ also supports the level 2 DOM.

For more information about the DOM, see the W3C DOM Web page.