Those of us who do not know Web Development, have always wondered how the website responds to you instantly. Gone are those days where you just had static web pages and the days where the page has to actually reload completely to show any change in them.
So this is how the DOM Tree would look like for the example HTML Code
- Change or Remove the elements from the DOM
- Change or Add CSS properties to the elements
- Read or change the element attributes like src, alt, href
- Attach event listeners to the elements and make them respond to events
- Create a new element and insert it anywhere
We will learn more about each one of these in this series.
Read Part 2 here