Understanding Concept of Document and Browser Object Model

While working with UI (i.e HTML and JavaScript) you always be hearing the concept of DOM and BOM keywords, so let's explore it
BOM contains reference to an open browser and helps you to play with browser.
Browser Object Model contains following object:
  • Window
  • Navigator
  • Screen
  • History
  • Location
To know more about Browser Object Model and their objects refer w3school site.
Another concept is DOM - Document Object Model. In HTML DOM everything is Node:
  • document object itself is a document node
  • All HTML elements are element nodes
  • All HTML attributes are attribute nodes
  • Text inside HTML element are text nodes
  • Comments are comment nodes
When an HTML document loaded into a browser, becomes a document object. The document object is the root node of the HTML document and the owner of all other nodes. And within JavaScript, document object have different properties and methods which helps us to access all nodes of the HTML document.

Note**: document object is property of window object and can be accessed as window.document.
To know more about Document Object Model refer w3school site.
w3school is best site to start with, if you are new to HTML, JavaScript concept.
Keep Reading Keep Learning.