O'Reilly logo
  • Ahmed Elgendy thinks this is interesting:


  1. Start by creating a document node at the top.

    image with no caption
  2. Next, take the top level element of your HTML page, in our case the <html> element, call it the current element and add it as a child of the document.


    Cover of Head First JavaScript Programming


    How to map the DOM (Document Object Model) of a webpage?