So this is how the DOM Tree would look like for the example HTML Code
What can we do with the DOM?
- 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.
Follow my articles on Dev.to: https://dev.to/developertharun
Written by Tharun Shiv
Subscribe to Tharun Shiv
Get the latest posts delivered right to your inbox