All about DOM.

Suplob Roy
Dec 29, 2021

Every web page has a Document Object Model (DOM) of the page.

An overview of the DOM model:-

Photo from W3Schools

With the help of DOM, javascript becomes more powerful and it helps to create dynamic HTML:

  1. JavaScript can change all the HTML elements of the page.
  2. JavaScript can change all the HTML attributes on the page.
  3. JavaScript can change all the CSS styles in the page
  4. JavaScript can remove existing HTML elements and attributes.
  5. JavaScript can add new HTML elements and attributes
  6. JavaScript can react to all existing HTML events on the page.
  7. JavaScript can create new HTML events on the page.

--

--