Documentation Part 2: DOM

The DOM

The DOM, short for the Document Object Model, is an AP that represents and interacts with HTML and XML documents. It allows code running in a browser to access and interact with every part of the document. It allows you to interact with and change parts of the strucutre of the HTML, referred to as Nodes. Programs can change the document structure, style, and content.

DOM Specifications

The DOM Specifications are to define a programming interface for XML and HTML documents. It is separated into three parts: Core, HTML, and XML. Core is for low level objects that can be used in any document. it is a compact and minimal design for manipulating the contents of a document and can represent anything in HTML or XML. The HTML and XML parts allow use of higher level interfaces with the core specification to make viewing the document more convienient and direct.

DOM Implementation

The DOM does not require anything special to use it, as it is largely built in with JavaScript. By using the script tag in HTML, you can begin to use it. console.log is a prime example of using the DOM. Using the "Document" method is another great example of implementing the DOM. Node, Element, NodeList, etc. are all great examples.

Summary

To summarize, we described the DOM and what it does. we described the specifications of the Document Object Model, and we also described how it is implemented within HTML and XML.