DOM Review

When are browser displays a web page it uses Window object to create a document object. This document object uses the concepts of the Document Object Model (DOM) to render and display a web page. Javascript has access to the content of all the objects within the Window including the document object (web page). Understanding Javascript requires improving your understanding of the DOM.

  1. document object
  2. The JavaScript Document object is the container for all HTML HEAD and BODY objects associated within the HTML tags of an HTML document.

  3. discuss how the browser renders your HTML and CSS into the document object
  4. node
  5. In the HTML DOM (Document Object Model), everything is a node: The document itself is a document node, All HTML elements are element nodes, All HTML attributes are attribute nodes, Text inside HTML elements are text nodes, Comments are comment nodes

  6. tree structure
  7. The tree structure is a way of thinking about how the web page is structured. For example the Document would be the trunk of the tree with two main branches called Head and the other being the body of the docuent. Then bothe of those have their own brances with the head having title link script and other elements, while the body may have header footer nav div elements. To go even further those elements can have branches such as div and inside those div's are content (the Leaf of the tree).

  8. event model or event handlers
  9. They are JavaScript code that are not added inside the script tags, but rather, inside the html tags, that execute JavaScript when something happens, such as pressing a button, moving your mouse over a link, submitting a form etc. The basic syntax of these event handlers is: name_of_handler="JavaScript code here"