Processing and the DOM
In this topic, we begin looking at “pages,” or the actual visualization of the content in your directories. However, before we make anything, we need to talk about how data gets from your keystrokes to a browser and how that browser renders information for viewing.
For example, HTML is a language that describes the structure of a document intended for viewing through a browser. The browser’s processor identifies elements of the document by looking for tags embedded directly in the text. Then, the Document Object Model (DOM) parses these elements.
What is the DOM?
The DOM is an interface to a document and stipulates how that document is accessed and changed by defining its structure in a logical way. The DOM represents these documents as nodes and objects on a tree structure so that programming languages such as JavaScript can modify the content.
This process becomes particularly useful when styling (or “decorating”) objects. Combined with some other processes (see “How Web Browsers Function”), the DOM helps connect styling wants to the appropriate structural elements.
What isn’t the DOM?
The DOM is not the same as your source code. Essentially, this means that the DOM is not a mirror of what you add to a .html
document, for example. At times, the DOM may even help correct invalid HTML to aid in the rendering process.
The DOM is therefore not a webpage; it is an essential step in creating one, however, even though you may never explicitly interact with it.
development
- Previous
- Next