Introduction to HTML DOM
The HTML DOM defines the standard for accessing and manipulating HTML documents.
Prerequisites
Before you continue, you should have a basic understanding of the following:
- HTML
- CSS
- JavaScript
If you need to learn these subjects first, visit our homepage.
What is the DOM?
The DOM is a W3C (World Wide Web Consortium) standard.
The DOM defines a standard for accessing HTML and XML documents:
"The W3C Document Object Model (DOM) is a platform and language-neutral interface that allows programs and scripts to dynamically access and update the content, structure, and style of a document."
The W3C DOM standard is divided into 3 different parts:
- Core DOM - standard model for any structured document
- XML DOM - standard model for XML documents
- HTML DOM - standard model for HTML documents
Editor's Note: DOM stands for Document Object Model.
What is the XML DOM?
The XML DOM defines the objects and properties of all XML elements, as well as the methods to access them.
If you need to learn the XML DOM, visit our XML DOM Tutorial.
What is the HTML DOM?
The HTML DOM is:
- The standard object model for HTML
- The standard programming interface for HTML
- A W3C standard
The HTML DOM defines the objects and properties of all HTML elements, as well as the methods to access them.
In other words, the HTML DOM is the standard for how to get, change, add, or delete HTML elements.