The Document Object Model

This YouTube video was created by Steve Griffith.

HTML and JavaScript are very different languages. One is a declarative markup language and the other object-oriented scripting language. Yet the two languages work together, thanks in large part to the Document Object model.

The Document Object Modelopen in new window (DOM) is a programming interface for HTML documents, like a web page. It provides a representation of the page so that programs can change the document structure style and content. Typically, these programs are written in JavaScript.

Because all modern browsers have implemented a variation of the DOM standard, there are no special requirements needed to start using the DOM, and many of the commonly used commands are supported by a majority of the browsers. When working with the DOM, the document and window elements are immediately available to manipulate the document and its children.