JavaScript DOM Levels

The W3C DOM specifications are divided into different levels where each level contains some required and optional modules.

Levels of DOM

Here the following tables describes levels of DOM.

Level Description
Level 0 supports an intermediate DOM, which exists before the creation of DOM Level 1
Level 1 is an API that allows program and scripts to dynamically access and update the content, structure, and style of HTML and XML 1.0 documents
Level 2 extends Level 1 with support for XML 1.0 with namespaces and adds support for CSS, events, and enhances tree manipulations
Level 3 extends Level 2 by finishing support for XML 1.0 with namespaces

JavaScript DOM Level 2

The JavaScript DOM Level 2 defines the following specifications, which have reached in their final form

Specification Description
DOM Level 2 Core helps the programs and scripts to access and update the content and structure of document dynamically
DOM Level 2 Views allows programs and scripts to dynamically access and update the content of an HTML or XML document
DOM Level 2 Events provides a generic event system to programs and scripts
DOM Level 2 Style allows programs and scripts to dynamically access and update the content of style sheets
DOM Level 2 Traversal and Range allows programs and scripts to dynamically traverse and identify a range of content in a document
DOM Level 2 HTML allows programs and scripts to dynamically access and update the content and structure of HTML 4.01 and XHTML 1.0 documents

JavaScript DOM Level 3

Basically DOM defined six specifications at Level 3, which are:

but only three of them were recommended by W3C for public use, all the three are described in the following table.

Specification Description
DOM Level 3 Core allows programs and scripts to dynamically access and update the content, structure, and document style
DOM Level 3 Load and Save allows programs and scripts to dynamically load the content of an XML document into a DOM document
DOM Level 3 Validation allows programs and scripts to dynamically update the content and structure of documents and ensures that the document remains valid

JavaScript Online Test


« Previous Tutorial Next Tutorial »